Class BouncyCastleAesGcmBytesEncryptor
- java.lang.Object
-
- org.springframework.security.crypto.encrypt.BouncyCastleAesGcmBytesEncryptor
-
- All Implemented Interfaces:
BytesEncryptor
public class BouncyCastleAesGcmBytesEncryptor extends java.lang.Object
An Encryptor equivalent toAesBytesEncryptor
usingAesBytesEncryptor.CipherAlgorithm.GCM
that uses Bouncy Castle instead of JCE. The algorithm is equivalent to "AES/GCM/NoPadding".
-
-
Constructor Summary
Constructors Constructor Description BouncyCastleAesGcmBytesEncryptor(java.lang.String password, java.lang.CharSequence salt)
BouncyCastleAesGcmBytesEncryptor(java.lang.String password, java.lang.CharSequence salt, BytesKeyGenerator ivGenerator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
decrypt(byte[] encryptedBytes)
Decrypt the byte array.byte[]
encrypt(byte[] bytes)
Encrypt the byte array.
-
-
-
Constructor Detail
-
BouncyCastleAesGcmBytesEncryptor
public BouncyCastleAesGcmBytesEncryptor(java.lang.String password, java.lang.CharSequence salt)
-
BouncyCastleAesGcmBytesEncryptor
public BouncyCastleAesGcmBytesEncryptor(java.lang.String password, java.lang.CharSequence salt, BytesKeyGenerator ivGenerator)
-
-
Method Detail
-
encrypt
public byte[] encrypt(byte[] bytes)
Description copied from interface:BytesEncryptor
Encrypt the byte array.
-
decrypt
public byte[] decrypt(byte[] encryptedBytes)
Description copied from interface:BytesEncryptor
Decrypt the byte array.
-
-