Class AESEncoder

    • Constructor Detail

      • AESEncoder

        public AESEncoder()
      • AESEncoder

        public AESEncoder​(String id,
                          int keyLength)
    • Method Detail

      • getIterations

        public int getIterations()
      • setIterations

        public void setIterations​(int iterations)
      • encode

        public byte[] encode​(byte[] toEncode,
                             byte[] salt,
                             byte[] passphrase,
                             String charset)
                      throws EncoderException
        Description copied from interface: Encoder
        Encode a string
        Specified by:
        encode in interface Encoder
        Overrides:
        encode in class RawAESEncoder
        Parameters:
        toEncode - data to encode
        salt - salt if supported
        passphrase - passphrase if supported
        charset - character set
        Returns:
        encoded bytes
        Throws:
        EncoderException - if encoding fails
      • decode

        public byte[] decode​(byte[] toDecode,
                             byte[] salt,
                             byte[] passphrase,
                             String charset)
                      throws EncoderException
        Description copied from interface: Encoder
        Decode bytes (if supported) to text.
        Specified by:
        decode in interface Encoder
        Overrides:
        decode in class RawAESEncoder
        Parameters:
        toDecode - bytes to decode
        salt - TODO
        passphrase - passphrase if supported
        charset - character set
        Returns:
        decoded text
        Throws:
        EncoderException - if encoding fails
      • match

        public boolean match​(byte[] encodedData,
                             byte[] unencodedData,
                             byte[] passphrase,
                             String charset)
        Description copied from interface: Encoder
        Check if the provide un-encoded data would match the encoded data if it was encoded.
        Specified by:
        match in interface Encoder
        Overrides:
        match in class AbstractEncoder
        Parameters:
        encodedData - encoded data
        unencodedData - un-encoded data
        passphrase - passphrase if supported
        charset - character set
        Returns:
        matches