Package com.axelor.common.crypto
Interface Encryptor<T,R>
-
- Type Parameters:
T
- the input typeR
- the return type
- All Known Implementing Classes:
BytesEncryptor
,StringEncryptor
public interface Encryptor<T,R>
TheEncryptor
interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
decrypt(R encryptedMessage)
Decrypt the given encrypted message.R
encrypt(T message)
Encrypt the given message.boolean
isEncrypted(T message)
Check whether the given message is already encrypted or not.
-
-
-
Method Detail
-
isEncrypted
boolean isEncrypted(T message)
Check whether the given message is already encrypted or not.- Parameters:
message
- the message to check- Returns:
- true if encrypted
-
encrypt
R encrypt(T message)
Encrypt the given message.- Parameters:
message
- the message to encrypt- Returns:
- encrypted message
-
-