Package com.aspectran.core.util
Class PBEncryptionUtils
- java.lang.Object
-
- com.aspectran.core.util.PBEncryptionUtils
-
public class PBEncryptionUtils extends java.lang.ObjectThis class provides basic encryption/decryption capabilities to implement PBE.Note: Note: Use
StrongPasswordEncryptorfor high-strength password digesting and checking.Created: 20/10/2018
- Since:
- 5.3.3
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_ALGORITHMstatic java.lang.StringENCRYPTION_ALGORITHM_KEYstatic java.lang.StringENCRYPTION_PASSWORD_KEY
-
Constructor Summary
Constructors Constructor Description PBEncryptionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringdecrypt(java.lang.String inputString)Decrypts the inputString using the encryption password.static java.lang.Stringdecrypt(java.lang.String inputString, java.lang.String encryptionPassword)Decrypts the inputString using the encryption password.static java.lang.Stringencrypt(java.lang.String inputString)Encrypts the inputString using the encryption password.static java.lang.Stringencrypt(java.lang.String inputString, java.lang.String encryptionPassword)Encrypts the inputString using the encryption password.static java.lang.StringgetAlgorithm()static org.jasypt.encryption.pbe.PBEStringEncryptorgetEncryptor()static org.jasypt.encryption.pbe.PBEStringEncryptorgetEncryptor(java.lang.String encryptionPassword)static java.lang.StringgetPassword()
-
-
-
Field Detail
-
DEFAULT_ALGORITHM
public static final java.lang.String DEFAULT_ALGORITHM
- See Also:
- Constant Field Values
-
ENCRYPTION_ALGORITHM_KEY
public static final java.lang.String ENCRYPTION_ALGORITHM_KEY
- See Also:
- Constant Field Values
-
ENCRYPTION_PASSWORD_KEY
public static final java.lang.String ENCRYPTION_PASSWORD_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAlgorithm
public static java.lang.String getAlgorithm()
-
getPassword
public static java.lang.String getPassword()
-
encrypt
public static java.lang.String encrypt(java.lang.String inputString)
Encrypts the inputString using the encryption password.- Parameters:
inputString- the string to encrypt- Returns:
- the encrypted string
-
encrypt
public static java.lang.String encrypt(java.lang.String inputString, java.lang.String encryptionPassword)Encrypts the inputString using the encryption password.- Parameters:
inputString- the string to encryptencryptionPassword- the password to be used for encryption- Returns:
- the encrypted string
-
decrypt
public static java.lang.String decrypt(java.lang.String inputString)
Decrypts the inputString using the encryption password.- Parameters:
inputString- the key used to originally encrypt the string- Returns:
- the decrypted version of inputString
-
decrypt
public static java.lang.String decrypt(java.lang.String inputString, java.lang.String encryptionPassword)Decrypts the inputString using the encryption password.- Parameters:
inputString- the key used to originally encrypt the stringencryptionPassword- the password to be used for encryption- Returns:
- the decrypted version of inputString
-
getEncryptor
public static org.jasypt.encryption.pbe.PBEStringEncryptor getEncryptor()
-
getEncryptor
public static org.jasypt.encryption.pbe.PBEStringEncryptor getEncryptor(java.lang.String encryptionPassword)
-
-