Interface CommonCipher

  • All Known Implementing Classes:
    AsymmetricCipher, SymmetricCipher

    public interface CommonCipher
    Common cipher which helps to simplify encryption and decryption of the message.
    • 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 by encryptToString(Base64Value).
        Required format: helidon:(formatVersion):encryptedDataInBase64
        Example: helidon:2:encryptedDataInBase64
        Parameters:
        cipherText - cipher text
        Returns:
        decrypted message