Implementation of the SHA-1 hashing function.
More...
Implementation of the SHA-1 hashing function.
|
file | sha1.h |
| SHA-1 interface definition.
|
|
◆ sha1()
void sha1 |
( |
void * |
digest, |
|
|
const void * |
data, |
|
|
size_t |
len |
|
) |
| |
Calculate a SHA1 hash from the given data.
- Parameters
-
[out] | digest | Result location, must be 20 byte |
[in] | data | Input data |
[in] | len | Length of buf |
◆ sha1_final()
Finalizes the SHA-1 message digest.
- Parameters
-
[in] | ctx | Pointer to the SHA-1 context |
[out] | digest | Result location, must be 20 byte |
◆ sha1_final_hmac()
Finalizes the SHA-1 message digest with MAC.
- Parameters
-
[in] | ctx | Pointer to the SHA-1 context |
[out] | digest | Result location, must be 20 byte |
◆ sha1_init()
Initialize SHA-1 message digest context.
- Parameters
-
[in] | ctx | Pointer to the SHA-1 context to initialize |
◆ sha1_init_hmac()
void sha1_init_hmac |
( |
sha1_context * |
ctx, |
|
|
const void * |
key, |
|
|
size_t |
key_length |
|
) |
| |
Initialize SHA-1 message digest context with MAC.
- Parameters
-
[in] | ctx | Pointer to the SHA-1 context to initialize |
[in] | key | Key used in the HMAC-SHA1 computation |
[in] | key_length | The size in bytes of key |
◆ sha1_update()
void sha1_update |
( |
sha1_context * |
ctx, |
|
|
const void * |
data, |
|
|
size_t |
len |
|
) |
| |
Update the SHA-1 context with a portion of the message being hashed.
- Parameters
-
[in] | ctx | Pointer to the SHA-1 context to update |
[in] | data | Input data |
[in] | len | Length of data |