Class AesBytesEncryptor
- java.lang.Object
-
- org.springframework.security.crypto.encrypt.AesBytesEncryptor
-
- All Implemented Interfaces:
BytesEncryptor
public final class AesBytesEncryptor extends java.lang.Object implements BytesEncryptor
Encryptor that uses 256-bit AES encryption.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AesBytesEncryptor.CipherAlgorithm
-
Constructor Summary
Constructors Constructor Description AesBytesEncryptor(java.lang.String password, java.lang.CharSequence salt)
AesBytesEncryptor(java.lang.String password, java.lang.CharSequence salt, BytesKeyGenerator ivGenerator)
AesBytesEncryptor(java.lang.String password, java.lang.CharSequence salt, BytesKeyGenerator ivGenerator, AesBytesEncryptor.CipherAlgorithm alg)
-
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
-
AesBytesEncryptor
public AesBytesEncryptor(java.lang.String password, java.lang.CharSequence salt)
-
AesBytesEncryptor
public AesBytesEncryptor(java.lang.String password, java.lang.CharSequence salt, BytesKeyGenerator ivGenerator)
-
AesBytesEncryptor
public AesBytesEncryptor(java.lang.String password, java.lang.CharSequence salt, BytesKeyGenerator ivGenerator, AesBytesEncryptor.CipherAlgorithm alg)
-
-
Method Detail
-
encrypt
public byte[] encrypt(byte[] bytes)
Description copied from interface:BytesEncryptor
Encrypt the byte array.- Specified by:
encrypt
in interfaceBytesEncryptor
-
decrypt
public byte[] decrypt(byte[] encryptedBytes)
Description copied from interface:BytesEncryptor
Decrypt the byte array.- Specified by:
decrypt
in interfaceBytesEncryptor
-
-