Package com.axelor.common.crypto
Class BytesEncryptor
java.lang.Object
com.axelor.common.crypto.BytesEncryptor
- All Implemented Interfaces:
Encryptor<byte[],byte[]>
-
Constructor Summary
ConstructorsConstructorDescriptionBytesEncryptor(OperationMode mode, PaddingScheme paddingScheme, String password) BytesEncryptor(String password) -
Method Summary
Modifier and TypeMethodDescriptionstatic BytesEncryptorbyte[]decrypt(byte[] bytes) Decrypt the given encrypted message.byte[]encrypt(byte[] bytes) Encrypt the given message.static BytesEncryptorbooleanisEncrypted(byte[] bytes) Check whether the given message is already encrypted or not.toString()
-
Constructor Details
-
BytesEncryptor
-
BytesEncryptor
-
-
Method Details
-
cbc
-
gcm
-
getTransformation
-
isEncrypted
public boolean isEncrypted(byte[] bytes) Description copied from interface:EncryptorCheck whether the given message is already encrypted or not.- Specified by:
isEncryptedin interfaceEncryptor<byte[],byte[]> - Parameters:
bytes- the message to check- Returns:
- true if encrypted
-
encrypt
public byte[] encrypt(byte[] bytes) Description copied from interface:EncryptorEncrypt the given message. -
decrypt
public byte[] decrypt(byte[] bytes) Description copied from interface:EncryptorDecrypt the given encrypted message. -
toString
-