Class SimpleGCMByteEncryptor
- java.lang.Object
-
- com.ulisesbocchio.jasyptspringboot.encryptor.SimpleGCMByteEncryptor
-
- All Implemented Interfaces:
org.jasypt.encryption.ByteEncryptor
public class SimpleGCMByteEncryptor extends Object implements org.jasypt.encryption.ByteEncryptor
-
-
Field Summary
Fields Modifier and Type Field Description static intAES_KEY_PASSWORD_SALT_LENGTHstatic intAES_KEY_SIZEstatic intGCM_IV_LENGTHstatic intGCM_TAG_LENGTH
-
Constructor Summary
Constructors Constructor Description SimpleGCMByteEncryptor(SimpleGCMConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]decrypt(byte[] encryptedMessage)byte[]encrypt(byte[] message)static StringgenerateBase64EncodedSecretKey()static SecretKeygenerateSecretKey()static SecretKeygetAESKeyFromPassword(char[] password, org.jasypt.salt.SaltGenerator saltGenerator, int iterations, String algorithm)
-
-
-
Field Detail
-
AES_KEY_SIZE
public static final int AES_KEY_SIZE
- See Also:
- Constant Field Values
-
AES_KEY_PASSWORD_SALT_LENGTH
public static final int AES_KEY_PASSWORD_SALT_LENGTH
- See Also:
- Constant Field Values
-
GCM_IV_LENGTH
public static final int GCM_IV_LENGTH
- See Also:
- Constant Field Values
-
GCM_TAG_LENGTH
public static final int GCM_TAG_LENGTH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SimpleGCMByteEncryptor
public SimpleGCMByteEncryptor(SimpleGCMConfig config)
-
-
Method Detail
-
encrypt
public byte[] encrypt(byte[] message)
- Specified by:
encryptin interfaceorg.jasypt.encryption.ByteEncryptor
-
decrypt
public byte[] decrypt(byte[] encryptedMessage)
- Specified by:
decryptin interfaceorg.jasypt.encryption.ByteEncryptor
-
generateSecretKey
public static SecretKey generateSecretKey()
-
generateBase64EncodedSecretKey
public static String generateBase64EncodedSecretKey()
-
-