![]() |
XMSS Library
|
Prototypes for the SHA-256 hash function override using the generic interface. More...
Go to the source code of this file.
Macros | |
#define | XMSS_OVERRIDE_SHA256_GENERIC_H_INCLUDED |
Include guard. | |
Functions | |
void * | xmss_sha256_init (void) |
Generic digest initialization function. Returns a context for use by the update and finalize functions. The supplier of the generic digest override has full control over the context; the returned context is treated as opaque by the XMSS library. More... | |
void | xmss_sha256_update (void *context, const uint8_t *data, size_t data_length) |
Generic digest update function. Updates the internal hash state for a single digest calculation with the additional data supplied. More... | |
void | xmss_sha256_finalize (void *context, XmssValue256 *digest) |
Generic digest finalize function. Outputs the digest and disposes the context. More... | |
Prototypes for the SHA-256 hash function override using the generic interface.
Include this file in your override implementation for SHA-256 using the generic digest interface.
Compile the library with CMake as follows:
void xmss_sha256_finalize | ( | void * | context, |
XmssValue256 * | digest | ||
) |
Generic digest finalize function. Outputs the digest and disposes the context.
[in] | context | An opaque context, i.e., the result of the most recent call to the initialization function on this thread. |
[out] | digest | The output of the hash function. |
This is the specialization for the SHA-256 algorithm.
void* xmss_sha256_init | ( | void | ) |
Generic digest initialization function. Returns a context for use by the update and finalize functions. The supplier of the generic digest override has full control over the context; the returned context is treated as opaque by the XMSS library.
The library will eventually call the finalize function exactly once for this context.
This is the specialization for the SHA-256 algorithm.
void xmss_sha256_update | ( | void * | context, |
const uint8_t * | data, | ||
size_t | data_length | ||
) |
Generic digest update function. Updates the internal hash state for a single digest calculation with the additional data supplied.
[in] | context | An opaque context, i.e., the result of the most recent call to the initialization function on this thread. |
[in] | data | The byte stream of additional data to be included in the message; may be NULL if and only if data_length is zero. |
[in] | data_length | The number of bytes pointed to by data . |
This is the specialization for the SHA-256 algorithm.