Data Structures | |
struct | mirkl_sha1_ctx_t_ |
SHA1 context. More... | |
Typedefs | |
typedef struct mirkl_sha1_ctx_t_ | mirkl_sha1_ctx_t |
SHA1 context. | |
Functions | |
void | mirkl_sha1_init (mirkl_sha1_ctx_t *context) |
Initialize new context. More... | |
void | mirkl_sha1_update (const unsigned char *data, uint32_t len, mirkl_sha1_ctx_t *context) |
Update context by feeding data. More... | |
void | mirkl_sha1_final (unsigned char digest[20], mirkl_sha1_ctx_t *context) |
Finalize calculating SHA1 digest. More... | |
void | mirkl_sha1 (unsigned char *hash_out, const unsigned char *str, uint32_t len) |
Compact variant of SHA1 digest calculation in case of single data piece. More... | |
void mirkl_sha1 | ( | unsigned char * | hash_out, |
const unsigned char * | str, | ||
uint32_t | len | ||
) |
Compact variant of SHA1 digest calculation in case of single data piece.
[out] | hash_out | Pointer to 21-byte-long array for the calculated digest. |
[in] | str | Pointer to a string for which SHA1 digest will be calculated. |
[in] | len | Length of the input string. |
void mirkl_sha1_final | ( | unsigned char | digest[20], |
mirkl_sha1_ctx_t * | context | ||
) |
Finalize calculating SHA1 digest.
[out] | digest | Array for the calculated digest. |
[in] | context | Pointer to SHA1 context structure. |
void mirkl_sha1_init | ( | mirkl_sha1_ctx_t * | context | ) |
Initialize new context.
[in] | context | Pointer to SHA1 context structure. |
void mirkl_sha1_update | ( | const unsigned char * | data, |
uint32_t | len, | ||
mirkl_sha1_ctx_t * | context | ||
) |
Update context by feeding data.
[in] | data | Pointer to the data. |
[in] | len | Length of the data. |
[in] | context | Pointer to SHA1 context structure. |