class

Crypto::Poly1305::OpenSSL

Inherits Crypto::Poly1305::MAC < Reference < Object

Poly1305 message authentication code (OpenSSL EVP_MAC backend).

Constants

BLOCK_SIZE = 16

Constructors

chacha20(key : Bytes, nonce : Bytes) : self

Generating the Poly1305 Key Using ChaCha20

Source
chacha20(cipher : ChaCha20::Cipher) : self

Generating the Poly1305 Key Using ChaCha20

Source
new(key : Bytes)

Initializes the Poly1305 context with a given 32-byte key.

Source
new(key : String)

Initializes the Poly1305 context with a given 32-byte hex-encoded key.

Source

Class methods

auth(key : Bytes, message : Bytes) : Bytes

A convenience method to compute a Poly1305 MAC for a single message.

Source

Instance methods

final

Finalizes the MAC computation and returns the 16-byte authenticator.

Source
finalize
Source
key
update(msg : Bytes)

Processes a message fragment.

Source