Class PlainEncoder

    • Constructor Detail

      • PlainEncoder

        public PlainEncoder()
    • Method Detail

      • encode

        public byte[] encode​(byte[] toEncode,
                             byte[] salt,
                             byte[] passphrase,
                             String charset)
                      throws EncoderException
        Description copied from interface: Encoder
        Encode a string
        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[] toEncode,
                             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 AbstractEncoder
        Parameters:
        toEncode - bytes to decode
        salt - TODO
        passphrase - passphrase if supported
        charset - character set
        Returns:
        decoded text
        Throws:
        EncoderException - if encoding fails