libhasha 2.2.2
|
Header file for the BLAKE2s hashing algorithm. More...
#include "internal/internal.h"
Go to the source code of this file.
Classes | |
struct | ha_blake2s_context |
BLAKE2s hashing context structure. More... |
Macros | |
#define | HA_BLAKE2S_BLOCK_SIZE 64 |
#define | HA_BLAKE2S_DIGEST_SIZE ha_bB(256) |
Typedefs | |
typedef struct ha_blake2s_context | ha_blake2s_context |
Functions | |
HA_PUBFUN void | ha_blake2s_init (ha_blake2s_context *ctx) |
Initializes the BLAKE2s hashing context. | |
HA_PUBFUN void | ha_blake2s_update (ha_blake2s_context *ctx, ha_inbuf_t data, size_t len) |
Updates the BLAKE2s hash with input data. | |
HA_PUBFUN void | ha_blake2s_final (ha_blake2s_context *ctx, ha_digest_t digest, size_t digestlen) |
Finalizes the BLAKE2s hash computation. | |
HA_PUBFUN void | ha_blake2s_hash (ha_inbuf_t data, size_t len, ha_digest_t digest, size_t digestlen) |
Computes the BLAKE2s hash of the input data. |
Header file for the BLAKE2s hashing algorithm.
This file provides the interface for the BLAKE2s cryptographic hash function, including the definition of the hash state context and function declarations for initializing, updating, finalizing, and computing the hash in a one-shot operation.
Definition in file blake2s.h.
typedef struct ha_blake2s_context ha_blake2s_context |
HA_PUBFUN void ha_blake2s_final | ( | ha_blake2s_context * | ctx, |
ha_digest_t | digest, | ||
size_t | digestlen ) |
Finalizes the BLAKE2s hash computation.
This function finalizes the hash and writes the output to the provided buffer.
ctx | Pointer to the BLAKE2s context. |
digest | Pointer to the output buffer (must be at least outlen bytes). |
digestlen | Desired length of the hash output in bytes (1–32). |
HA_PUBFUN void ha_blake2s_hash | ( | ha_inbuf_t | data, |
size_t | len, | ||
ha_digest_t | digest, | ||
size_t | digestlen ) |
Computes the BLAKE2s hash of the input data.
This function performs a one-shot hash computation, initializing, updating, and finalizing the context in a single call.
data | Pointer to the input data. |
len | Length of the input data in bytes. |
digest | Pointer to the output buffer (must be at least digestlen bytes). |
digestlen | Desired length of the hash output in bytes (1–32). |
HA_PUBFUN void ha_blake2s_init | ( | ha_blake2s_context * | ctx | ) |
Initializes the BLAKE2s hashing context.
ctx | Pointer to the BLAKE2s context. |
HA_PUBFUN void ha_blake2s_update | ( | ha_blake2s_context * | ctx, |
ha_inbuf_t | data, | ||
size_t | len ) |
Updates the BLAKE2s hash with input data.
This function processes the input data in blocks, updating the internal state.
ctx | Pointer to the BLAKE2s context. |
data | Pointer to the input data. |
len | Length of the input data in bytes. |