Class BouncyCastleAesGcmBytesEncryptor
java.lang.Object
org.springframework.security.crypto.encrypt.BouncyCastleAesGcmBytesEncryptor
- All Implemented Interfaces:
BytesEncryptor
An Encryptor equivalent to
AesBytesEncryptor
using AesBytesEncryptor.CipherAlgorithm.GCM
that uses Bouncy Castle instead of JCE. The algorithm is equivalent to
"AES/GCM/NoPadding".-
Constructor Summary
ConstructorDescriptionBouncyCastleAesGcmBytesEncryptor
(String password, CharSequence salt) BouncyCastleAesGcmBytesEncryptor
(String password, CharSequence salt, BytesKeyGenerator ivGenerator) -
Method Summary
-
Constructor Details
-
BouncyCastleAesGcmBytesEncryptor
-
BouncyCastleAesGcmBytesEncryptor
public BouncyCastleAesGcmBytesEncryptor(String password, CharSequence salt, BytesKeyGenerator ivGenerator)
-
-
Method Details
-
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.
-