std1.0.0-beta-7 SafeC docs

std :: crypto::chacha20

Struct std::Poly1305

#include <std/crypto/chacha20.h> source

struct Poly1305 {
    unsigned int r[5];
    unsigned int h[5];
    unsigned int pad[4];
    unsigned char buf[16];
    unsigned long buf_len;
}

Streaming Poly1305 with a one-time 32-byte key (r || s).

Fields

§unsigned int r[5]source

clamped r, 26-bit limbs

§unsigned int h[5]source

accumulator

§unsigned int pad[4]source

s

§unsigned char buf[16]source

a partial block

§unsigned long buf_lensource

Methods

§static struct Poly1305 new([]const unsigned char key)source · definition
§void update([]const unsigned char data)source · definition
§void pad16()source · definition

Pads the input so far to a multiple of 16 bytes with zeros (the AEAD's pad16 between the additional data and the ciphertext).

§void finish([]unsigned char tag)source · definition

Writes the 16-byte tag and wipes the state.