@Test public void testIVGeneration() { for (int i = 0; i < 100000; i++) Assert.assertNotEquals(0, EncryptionUtil.generateIV()[0]); }
public static byte[] generateIV() { SecureRandom random = new SecureRandom(); byte[] iv = new byte[IV_LENGTH]; do { random.nextBytes(iv); } while (iv[0] == 0); return iv; }
EncryptionUtil { public static byte[] generateIV() { SecureRandom random = new SecureRandom(); byte[] iv = new byte[IV_LENGTH]; do { random.nextBytes(iv); } while (iv[0] == 0); return iv; } }
EncryptionUtil { public static byte[] generateIV() { SecureRandom random = new SecureRandom(); byte[] iv = new byte[IV_LENGTH]; do { random.nextBytes(iv); } while (iv[0] == 0); return iv; } private  EncryptionUtil(); }
EncryptionUtil { public static byte[] generateIV() { SecureRandom random = new SecureRandom(); byte[] iv = new byte[IV_LENGTH]; do { random.nextBytes(iv); } while (iv[0] == 0); return iv; } private  EncryptionUtil(); static byte[] generateIV(); static SecretKey generateAESKey(AES_KEYLENGTH keyLength, String securityProvider); static KeyPair generateRSAKeyPair(RSA_KEYLENGTH keyLength, String securityProvider); static byte[] encryptAES(byte[] data, SecretKey secretKey, byte[] initVector, String securityProvider,
			IStrongAESEncryption strongAES); static byte[] decryptAES(byte[] data, SecretKey secretKey, byte[] initVector, String securityProvider,
			IStrongAESEncryption strongAES); static byte[] encryptRSA(byte[] data, PublicKey publicKey, String securityProvider); static byte[] decryptRSA(byte[] data, PrivateKey privateKey, String securityProvider); static HybridEncryptedContent encryptHybrid(byte[] data, PublicKey publicKey, AES_KEYLENGTH aesKeyLength,
			String securityProvider, IStrongAESEncryption strongAES); static byte[] decryptHybrid(HybridEncryptedContent data, PrivateKey privateKey, String securityProvider,
			IStrongAESEncryption strongAES); static byte[] sign(byte[] data, PrivateKey privateKey, String securityProvider); static boolean verify(byte[] data, byte[] signature, PublicKey publicKey, String securityProvider); static String byteToHex(byte[] data); }
EncryptionUtil { public static byte[] generateIV() { SecureRandom random = new SecureRandom(); byte[] iv = new byte[IV_LENGTH]; do { random.nextBytes(iv); } while (iv[0] == 0); return iv; } private  EncryptionUtil(); static byte[] generateIV(); static SecretKey generateAESKey(AES_KEYLENGTH keyLength, String securityProvider); static KeyPair generateRSAKeyPair(RSA_KEYLENGTH keyLength, String securityProvider); static byte[] encryptAES(byte[] data, SecretKey secretKey, byte[] initVector, String securityProvider,
			IStrongAESEncryption strongAES); static byte[] decryptAES(byte[] data, SecretKey secretKey, byte[] initVector, String securityProvider,
			IStrongAESEncryption strongAES); static byte[] encryptRSA(byte[] data, PublicKey publicKey, String securityProvider); static byte[] decryptRSA(byte[] data, PrivateKey privateKey, String securityProvider); static HybridEncryptedContent encryptHybrid(byte[] data, PublicKey publicKey, AES_KEYLENGTH aesKeyLength,
			String securityProvider, IStrongAESEncryption strongAES); static byte[] decryptHybrid(HybridEncryptedContent data, PrivateKey privateKey, String securityProvider,
			IStrongAESEncryption strongAES); static byte[] sign(byte[] data, PrivateKey privateKey, String securityProvider); static boolean verify(byte[] data, byte[] signature, PublicKey publicKey, String securityProvider); static String byteToHex(byte[] data);  }