Package com.axelor.common.crypto
Class StringEncryptor
- java.lang.Object
-
- com.axelor.common.crypto.StringEncryptor
-
-
Constructor Summary
Constructors Constructor Description StringEncryptor(BytesEncryptor encryptor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringEncryptor
cbc(String password)
String
decrypt(String encryptedMessage)
Decrypt the given encrypted message.String
encrypt(String message)
Encrypt the given message.static StringEncryptor
gcm(String password)
boolean
isEncrypted(String message)
Check whether the given message is already encrypted or not.String
toString()
-
-
-
Constructor Detail
-
StringEncryptor
public StringEncryptor(BytesEncryptor encryptor)
-
-
Method Detail
-
cbc
public static StringEncryptor cbc(String password)
-
gcm
public static StringEncryptor gcm(String password)
-
isEncrypted
public boolean isEncrypted(String message)
Description copied from interface:Encryptor
Check whether the given message is already encrypted or not.- Specified by:
isEncrypted
in interfaceEncryptor<String,String>
- Parameters:
message
- the message to check- Returns:
- true if encrypted
-
encrypt
public String encrypt(String message)
Description copied from interface:Encryptor
Encrypt the given message.
-
decrypt
public String decrypt(String encryptedMessage)
Description copied from interface:Encryptor
Decrypt the given encrypted message.
-
-