jdk/test/com/oracle/security/ucrypto/TestCICOWithGCMAndAAD.java
changeset 34706 2290e3a1f481
parent 30046 cf2c86e1819e
--- a/jdk/test/com/oracle/security/ucrypto/TestCICOWithGCMAndAAD.java	Wed Dec 16 12:17:03 2015 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/TestCICOWithGCMAndAAD.java	Wed Dec 16 08:38:10 2015 -0800
@@ -65,7 +65,10 @@
         byte[] aad2 = aad.clone();
         aad2[50]++;
 
-        GCMParameterSpec spec = new GCMParameterSpec(128, new byte[16]);
+        byte[] iv = new byte[16];
+        rdm.nextBytes(iv);
+
+        GCMParameterSpec spec = new GCMParameterSpec(128, iv);
         Cipher encCipher = Cipher.getInstance("AES/GCM/NoPadding", p);
         encCipher.init(Cipher.ENCRYPT_MODE, key, spec);
         encCipher.updateAAD(aad);