-
- All Known Implementing Classes:
AsymmetricCipher,SymmetricCipher
public interface CommonCipherCommon cipher which helps to simplify encryption and decryption of the message.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Base64Valuedecrypt(Base64Value encrypted)Decrypt encrypted message.default Base64ValuedecryptFromString(String cipherText)Decrypt cipherText provided byencryptToString(Base64Value).Base64Valueencrypt(Base64Value message)Encrypt message.default StringencryptToString(Base64Value message)Encrypt message to the String format.
-
-
-
Method Detail
-
encrypt
Base64Value encrypt(Base64Value message)
Encrypt message.- Parameters:
message- message- Returns:
- encrypted message
-
decrypt
Base64Value decrypt(Base64Value encrypted)
Decrypt encrypted message.- Parameters:
encrypted- encrypted message- Returns:
- decrypted message
-
encryptToString
default String encryptToString(Base64Value message)
Encrypt message to the String format.
Template format:helidon:(formatVersion):encryptedDataInBase64
Example:helidon:2:encryptedDataInBase64- Parameters:
message- message- Returns:
- cipher text
-
decryptFromString
default Base64Value decryptFromString(String cipherText)
Decrypt cipherText provided byencryptToString(Base64Value).
Required format:helidon:(formatVersion):encryptedDataInBase64
Example:helidon:2:encryptedDataInBase64- Parameters:
cipherText- cipher text- Returns:
- decrypted message
-
-