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 BytesEncryptor
byte[]
decrypt
(byte[] bytes) Decrypt the given encrypted message.byte[]
encrypt
(byte[] bytes) Encrypt the given message.static BytesEncryptor
boolean
isEncrypted
(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:Encryptor
Check whether the given message is already encrypted or not.- Specified by:
isEncrypted
in interfaceEncryptor<byte[],
byte[]> - Parameters:
bytes
- the message to check- Returns:
- true if encrypted
-
encrypt
public byte[] encrypt(byte[] bytes) Description copied from interface:Encryptor
Encrypt the given message. -
decrypt
public byte[] decrypt(byte[] bytes) Description copied from interface:Encryptor
Decrypt the given encrypted message. -
toString
-