- All Known Implementing Classes:
AsymmetricCipher,SymmetricCipher
public interface CommonCipher
Common cipher which helps to simplify encryption and decryption of the message.
-
Method Summary
Modifier and TypeMethodDescriptiondecrypt(Base64Value encrypted) Decrypt encrypted message.default Base64ValuedecryptFromString(String cipherText) Decrypt cipherText provided byencryptToString(Base64Value).encrypt(Base64Value message) Encrypt message.default StringencryptToString(Base64Value message) Encrypt message to the String format.
-
Method Details
-
encrypt
Encrypt message.- Parameters:
message- message- Returns:
- encrypted message
-
decrypt
Decrypt encrypted message.- Parameters:
encrypted- encrypted message- Returns:
- decrypted message
-
encryptToString
Encrypt message to the String format.
Template format:helidon:(formatVersion):encryptedDataInBase64
Example:helidon:2:encryptedDataInBase64- Parameters:
message- message- Returns:
- cipher text
-
decryptFromString
Decrypt cipherText provided byencryptToString(Base64Value).
Required format:helidon:(formatVersion):encryptedDataInBase64
Example:helidon:2:encryptedDataInBase64- Parameters:
cipherText- cipher text- Returns:
- decrypted message
-