class Crypto::Poly1305::OpenSSL

Overview

Poly1305 message authentication code (OpenSSL EVP_MAC backend).

Defined in:

crypto/poly1305/openssl.cr

Constant Summary

BLOCK_SIZE = 16

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Crypto::Poly1305::MAC

final : Bytes final, key : Bytes key, update(msg : Bytes) update

Constructor Detail

def self.chacha20(key : Bytes, nonce : Bytes) : self #

Generating the Poly1305 Key Using ChaCha20


[View source]
def self.chacha20(cipher : ChaCha20::Cipher) : self #

Generating the Poly1305 Key Using ChaCha20


[View source]
def self.new(key : Bytes) #

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


[View source]
def self.new(key : String) #

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


[View source]

Class Method Detail

def self.auth(key : Bytes, message : Bytes) : Bytes #

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


[View source]

Instance Method Detail

def final : Bytes #

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


[View source]
def finalize #

[View source]
def key : Bytes #

def update(msg : Bytes) #

Processes a message fragment.


[View source]