libhasha 2.2.2
|
Header file for the BLAKE2b hashing algorithm. More...
#include "internal/internal.h"
Go to the source code of this file.
Classes | |
struct | ha_blake2b_context |
BLAKE2B hashing context structure. More... |
Macros | |
#define | HA_BLAKE2B_BLOCK_SIZE 128 |
The size of a BLAKE2B block in bytes. | |
#define | HA_BLAKE2B_DIGEST_SIZE ha_bB(512) |
The default output digest size for BLAKE2B (512 bits). |
Typedefs | |
typedef struct ha_blake2b_context | ha_blake2b_context |
Functions | |
HA_PUBFUN void | ha_blake2b_init (ha_blake2b_context *ctx) |
Initializes a BLAKE2B context. | |
HA_PUBFUN void | ha_blake2b_update (ha_blake2b_context *ctx, ha_inbuf_t data, size_t len) |
Updates the BLAKE2B hash state with input data. | |
HA_PUBFUN void | ha_blake2b_final (ha_blake2b_context *ctx, ha_digest_t digest, size_t digestlen) |
Finalizes the BLAKE2B hash and produces the digest. | |
HA_PUBFUN void | ha_blake2b_hash (ha_inbuf_t data, size_t len, ha_digest_t digest, size_t digestlen) |
Computes the BLAKE2B hash in a one-shot operation. |
Header file for the BLAKE2b hashing algorithm.
This file provides the interface for the BLAKE2b cryptographic hash function. It includes the definition of the hash state context and function declarations for initializing, updating, finalizing, and computing the hash in a one-shot operation. BLAKE2b is optimized for 64-bit platforms and offers high security and performance.
Definition in file blake2b.h.
#define HA_BLAKE2B_BLOCK_SIZE 128 |
#define HA_BLAKE2B_DIGEST_SIZE ha_bB(512) |
typedef struct ha_blake2b_context ha_blake2b_context |
HA_PUBFUN void ha_blake2b_final | ( | ha_blake2b_context * | ctx, |
ha_digest_t | digest, | ||
size_t | digestlen ) |
Finalizes the BLAKE2B hash and produces the digest.
ctx | Pointer to the initialized BLAKE2B context. |
digest | Pointer to the output buffer where the hash will be stored. |
digestlen | Desired length of the output hash (1 to 64 bytes). |
HA_PUBFUN void ha_blake2b_hash | ( | ha_inbuf_t | data, |
size_t | len, | ||
ha_digest_t | digest, | ||
size_t | digestlen ) |
Computes the BLAKE2B hash in a one-shot operation.
This function initializes a BLAKE2B context, processes the input data, and finalizes the hash computation, storing the result in the provided buffer.
data | Pointer to the input data. |
len | Length of the input data in bytes. |
digest | Pointer to the output buffer where the hash will be stored. |
digestlen | Desired length of the output hash (1 to 64 bytes). |
HA_PUBFUN void ha_blake2b_init | ( | ha_blake2b_context * | ctx | ) |
Initializes a BLAKE2B context.
ctx | Pointer to the BLAKE2B context to initialize. |
HA_PUBFUN void ha_blake2b_update | ( | ha_blake2b_context * | ctx, |
ha_inbuf_t | data, | ||
size_t | len ) |
Updates the BLAKE2B hash state with input data.
ctx | Pointer to the initialized BLAKE2B context. |
data | Pointer to the input data. |
len | Length of the input data in bytes. |