decrypting aes-gcm encrypted with java using openssl
问题 I have the following code in Java: public static void deriveKeyAndIV(String password) throws Exception { SecureRandom random = new SecureRandom(); if (salt == null) { salt = new byte[HASH_BYTE_SIZE / 8]; // use salt size at least as long as hash random.nextBytes(salt); } if (ivBytes == null) { ivBytes = new byte[HASH_BYTE_SIZE / 8]; random.nextBytes(ivBytes); } PBEKeySpec spec = new PBEKeySpec(password.toCharArray(), salt, PBKDF2_ITERATIONS, HASH_BYTE_SIZE); SecretKeyFactory skf =