Interface Codec

    • Method Detail

      • encode

        byte[] encode​(Identity identity)
               throws IOException
        Encode identity into bytes.
        Parameters:
        identity - The identity
        Returns:
        Text
        Throws:
        IOException - If fails
      • decode

        Identity decode​(byte[] bytes)
                 throws IOException
        Decode identity from text (or throw DecodingException).

        This method may throw DecodingException, if it's not possible to decode the incoming byte array. This exception will mean that the user can't be authenticated and Identity.ANONYMOUS object will be identified.

        Parameters:
        bytes - Text
        Returns:
        Identity
        Throws:
        IOException - If fails