@@ -72,7 +72,7 @@ public byte[] encrypt(byte[] plaintext, byte[] salt, byte[] privateKey, String k
7272 byte [] nonce = keyAndNonce [1 ];
7373
7474 // Note: Cipher adds the tag to the end of the ciphertext
75- Cipher cipher = Cipher .getInstance ("AES/GCM/NoPadding" , "BC" );
75+ Cipher cipher = Cipher .getInstance ("AES/GCM/NoPadding" );
7676 GCMParameterSpec params = new GCMParameterSpec (TAG_SIZE * 8 , nonce );
7777 cipher .init (ENCRYPT_MODE , new SecretKeySpec (key , "AES" ), params );
7878
@@ -101,7 +101,7 @@ public byte[] encrypt(byte[] plaintext, byte[] salt, byte[] privateKey, String k
101101 * @param version AES128GCM or AESGCM.
102102 * @return
103103 */
104- public byte [] decrypt (byte [] payload , byte [] salt , byte [] key , String keyid , Encoding version ) throws InvalidKeyException , NoSuchAlgorithmException , IllegalBlockSizeException , InvalidAlgorithmParameterException , BadPaddingException , NoSuchProviderException , NoSuchPaddingException {
104+ public byte [] decrypt (byte [] payload , byte [] salt , byte [] key , String keyid , Encoding version ) throws InvalidKeyException , NoSuchAlgorithmException , IllegalBlockSizeException , InvalidAlgorithmParameterException , BadPaddingException , NoSuchPaddingException {
105105 byte [] body ;
106106
107107 // Parse and strip the header
@@ -136,8 +136,8 @@ public byte[][] parseHeader(byte[] payload) {
136136 };
137137 }
138138
139- public byte [] decryptRecord (byte [] ciphertext , byte [] key , byte [] nonce , Encoding version ) throws NoSuchPaddingException , NoSuchAlgorithmException , NoSuchProviderException , InvalidAlgorithmParameterException , InvalidKeyException , BadPaddingException , IllegalBlockSizeException {
140- Cipher cipher = Cipher .getInstance ("AES/GCM/NoPadding" , "BC" );
139+ public byte [] decryptRecord (byte [] ciphertext , byte [] key , byte [] nonce , Encoding version ) throws NoSuchPaddingException , NoSuchAlgorithmException , InvalidAlgorithmParameterException , InvalidKeyException , BadPaddingException , IllegalBlockSizeException {
140+ Cipher cipher = Cipher .getInstance ("AES/GCM/NoPadding" );
141141 GCMParameterSpec params = new GCMParameterSpec (TAG_SIZE * 8 , nonce );
142142 cipher .init (DECRYPT_MODE , new SecretKeySpec (key , "AES" ), params );
143143
0 commit comments