Class HawaiiStringEncryptor

  • All Implemented Interfaces:
    org.jasypt.encryption.StringEncryptor

    public class HawaiiStringEncryptor
    extends Object
    implements org.jasypt.encryption.StringEncryptor
    Implementation of Jasypt's StringEncryptor interface. This class registers the Bouncy Castle JCE Provider.
    Since:
    2.0.0
    Author:
    Wouter Eerdekens
    See Also:
    StringEncryptor, BouncyCastleProvider
    • Constructor Detail

      • HawaiiStringEncryptor

        public HawaiiStringEncryptor​(String key,
                                     String initVector)
        Creates a new HawaiiStringEncryptor with the given key and init vector.
        Parameters:
        key - the key used for encryption/decryption
        initVector - the init vector used for encryption/decryption
    • Method Detail

      • encrypt

        public String encrypt​(String message)
        Encrypt the input message.
        Specified by:
        encrypt in interface org.jasypt.encryption.StringEncryptor
        Parameters:
        message - the message to be encrypted
        Returns:
        the result of encryption
        Throws:
        HawaiiException - when an error occurs.
      • decrypt

        public String decrypt​(String encryptedMessage)
        Decrypt the encrypted input message.
        Specified by:
        decrypt in interface org.jasypt.encryption.StringEncryptor
        Parameters:
        encryptedMessage - the message to be decrypted
        Returns:
        the result of decryption
        Throws:
        HawaiiException - when an error occurs.