Class Poly1305

    • Constructor Summary

      Constructors 
      Constructor Description
      Poly1305()
      Constructs a new Poly1305 message authenticator.
    • Constructor Detail

      • Poly1305

        public Poly1305()
        Constructs a new Poly1305 message authenticator.
    • Method Detail

      • reset

        public void reset​(byte[] key,
                          int offset)
        Resets the message authenticator with a new key.
        Parameters:
        key - The buffer containing the 32 byte key.
        offset - The offset into the buffer of the first key byte.
      • update

        public void update​(byte[] data,
                           int offset,
                           int length)
        Updates the message authenticator with more input data.
        Parameters:
        data - The buffer containing the input data.
        offset - The offset of the first byte of input.
        length - The number of bytes of input.
      • pad

        public void pad()
        Pads the input with zeroes to a multiple of 16 bytes.
      • finish

        public void finish​(byte[] token,
                           int offset)
        Finishes the message authenticator and returns the 16-byte token.
        Parameters:
        token - The buffer to receive the token.
        offset - The offset of the token in the buffer.
      • destroy

        public void destroy()
        Description copied from interface: Destroyable
        Destroys all sensitive state in the current object.
        Specified by:
        destroy in interface Destroyable