public final class Poly1305 extends Object implements Destroyable, Cloneable
| Constructor and Description |
|---|
Poly1305()Constructs a new Poly1305 message authenticator. |
| Modifier and Type | Method and Description |
|---|---|
Poly1305 | clone()I2P |
void | destroy()Destroys all sensitive state in the current object. |
void | finish(byte[] token,
int offset)Finishes the message authenticator and returns the 16-byte token. |
void | pad()Pads the input with zeroes to a multiple of 16 bytes. |
void | reset(byte[] key,
int offset)Resets the message authenticator with a new key. |
void | update(byte[] data,
int offset,
int length)Updates the message authenticator with more input data. |
public Poly1305 clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic void destroy()
Destroyabledestroy in interface Destroyablepublic void finish(byte[] token,
int offset)token - The buffer to receive the token.offset - The offset of the token in the buffer.public void pad()
public void reset(byte[] key,
int offset)key - The buffer containing the 32 byte key.offset - The offset into the buffer of the first key byte.public void update(byte[] data,
int offset,
int length)data - The buffer containing the input data.offset - The offset of the first byte of input.length - The number of bytes of input.