|
SharkSSL C/C++ Reference
TLS, cryptography, certificates, and PSA integration
|
SHA1 cryptographic hash.
Data Structures | |
| struct | SharkSslSha1Ctx |
| SHA1. More... | |
Typedefs | |
| typedef struct SharkSslSha1Ctx | SharkSslSha1Ctx |
| SHA1. More... | |
Functions | |
| SHARKSSL_API int | SharkSslSha1Ctx_constructor (SharkSslSha1Ctx *ctx) |
| Initialize. More... | |
| SHARKSSL_API int | SharkSslSha1Ctx_append (SharkSslSha1Ctx *ctx, const U8 *data, U32 len) |
| append More... | |
| SHARKSSL_API int | SharkSslSha1Ctx_finish (SharkSslSha1Ctx *ctx, U8 digest[SHARKSSL_SHA1_HASH_LEN]) |
| finish More... | |
| SHARKSSL_API int | sharkssl_sha1 (const U8 *, U32, U8 *) |
| sha1 More... | |
| typedef struct SharkSslSha1Ctx SharkSslSha1Ctx |
SHA1.
| int sharkssl_sha1 | ( | const U8 * | data, |
| U32 | len, | ||
| U8 * | digest | ||
| ) |
sha1
| data | const U8 *; bytes to hash, borrowed for this call. May be NULL when len is zero. |
| len | U32; input length in bytes. |
| digest | U8 *; required caller-owned output buffer of at least 20 bytes. |
| int SharkSslSha1Ctx_append | ( | SharkSslSha1Ctx * | ctx, |
| const U8 * | data, | ||
| U32 | len | ||
| ) |
append
| ctx | SharkSslSha1Ctx *; required initialized, unfinished context; updated in place. |
| data | const U8 *; input bytes, borrowed for this call. Supply a valid buffer when len is nonzero. |
| len | U32; input length in bytes, including zero. |
| int SharkSslSha1Ctx_constructor | ( | SharkSslSha1Ctx * | ctx | ) |
Initialize.
Use caller-owned, correctly aligned context storage.
| ctx | Uninitialized data of size sizeof(SharkSslSha1Ctx). |
Finish or abort an active PSA hash before reinitializing that storage.
| int SharkSslSha1Ctx_finish | ( | SharkSslSha1Ctx * | ctx, |
| U8 | digest[SHARKSSL_SHA1_HASH_LEN] | ||
| ) |
finish
| ctx | SharkSslSha1Ctx *; required initialized context; finalized by this call. Reinitialize before hashing another message. |
| digest | U8 *; required caller-owned output buffer of at least 20 bytes. |