NAME
sha3_224_init, sha3_256_init, sha3_384_init, sha3_512_init, sha3_update, sha3_final - compute the SHA3 of a given block of data
SYNOPSIS
#include <limb/sha3.h>
void sha3_224_init(void *ctx); void sha3_256_init(void *ctx); void sha3_384_init(void *ctx); void sha3_512_init(void *ctx); void sha3_update(const void *msg, size_t size, void *ctx); void sha3_final(void * restrict md, void *ctx);
DESCRIPTION
The sha3_224_init
() function initializes the given sha3 context ctx
to
calculate a digest of 224 bits.
The sha3_256_init
(), sha3_384_init
() and sha3_512_init
() functions are
similar, but initializing the conext for a SHA3 of 256, 384 and 512 bits
respectively.
The sha3_update
() function feeds the specified chunk of data pointed by msg
of length size
(in bytes) to be hashed into the given ctx
. You can call this
function repeatedly as many times as needed.
The sha3_final
() function stores the calculated hash from ctx
in binary form
into md
, which must be able to store as many bytes as needed: bits / 8
,
where bits
corresponds to the sha3_*_init
() function called.
SEE ALSO
hasher_sha3_224.h(0), hasher_sha3_256.h(0), hasher_sha3_384.h(0), hasher_sha3_512.h(0), hasher_hash(3), blake3_init(3)