cancel
Showing results for 
Search instead for 
Did you mean: 

GCM can not be used with class javax.crypto.spec.GCMParameterSpec

0 Kudos

In EP portal, I'm Encrypting the data with "AES/GCM/NoPadding" algorithm, before cipher init method I'm getting java.security.InvalidAlgorithmParameterException: GCM can not be used with class javax.crypto.spec.GCMParameterSpec error, is there any specific reason for this??

<code>Cipher cipher =Cipher.getInstance("AES/GCM/NoPadding");GCMParameterSpec parameterSpec =newGCMParameterSpec(128, iv);SecretKeySpec keySpec =newSecretKeySpec(key,"AES");
cipher.init(Cipher.ENCRYPT_MODE, keySpec, parameterSpec);
cristiano_mazzotti
Active Participant
0 Kudos

Alerted Moderator for incorrect tag

Accepted Solutions (0)

Answers (0)