Constructor and Description |
---|
BytesEncryptor(OperationMode mode,
PaddingScheme paddingScheme,
String password) |
BytesEncryptor(String password) |
Modifier and Type | Method and Description |
---|---|
static BytesEncryptor |
cbc(String password) |
byte[] |
decrypt(byte[] bytes)
Decrypt the given encrypted message.
|
byte[] |
encrypt(byte[] bytes)
Encrypt the given message.
|
static BytesEncryptor |
gcm(String password) |
String |
getTransformation() |
boolean |
isEncrypted(byte[] bytes)
Check whether the given message is already encrypted or not.
|
String |
toString() |
public BytesEncryptor(OperationMode mode, PaddingScheme paddingScheme, String password)
public BytesEncryptor(String password)
public static BytesEncryptor cbc(String password)
public static BytesEncryptor gcm(String password)
public String getTransformation()
public boolean isEncrypted(byte[] bytes)
Encryptor
isEncrypted
in interface Encryptor<byte[],byte[]>
bytes
- the message to checkpublic byte[] encrypt(byte[] bytes)
Encryptor
public byte[] decrypt(byte[] bytes)
Encryptor