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 StringEncryptorcbc(String password)Stringdecrypt(String encryptedMessage)Decrypt the given encrypted message.Stringencrypt(String message)Encrypt the given message.static StringEncryptorgcm(String password)booleanisEncrypted(String message)Check whether the given message is already encrypted or not.StringtoString()
-
-
-
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:EncryptorCheck whether the given message is already encrypted or not.- Specified by:
isEncryptedin interfaceEncryptor<String,String>- Parameters:
message- the message to check- Returns:
- true if encrypted
-
encrypt
public String encrypt(String message)
Description copied from interface:EncryptorEncrypt the given message.
-
decrypt
public String decrypt(String encryptedMessage)
Description copied from interface:EncryptorDecrypt the given encrypted message.
-
-