|
SharkSSL C/C++ Reference
TLS, cryptography, certificates, and PSA integration
|
POLY1305.
Data Structures | |
| struct | SharkSslPoly1305Ctx |
| POLY1305. More... | |
Typedefs | |
| typedef struct SharkSslPoly1305Ctx | SharkSslPoly1305Ctx |
| POLY1305. More... | |
Functions | |
| SHARKSSL_API void | SharkSslPoly1305Ctx_constructor (SharkSslPoly1305Ctx *ctx, const U8 key[32]) |
| Initialize. More... | |
| SHARKSSL_API void | SharkSslPoly1305Ctx_append (SharkSslPoly1305Ctx *ctx, const U8 *in, U32 len) |
| append More... | |
| SHARKSSL_API void | SharkSslPoly1305Ctx_finish (SharkSslPoly1305Ctx *ctx, U8 digest[SHARKSSL_POLY1305_HASH_LEN]) |
| finish More... | |
| SHARKSSL_API int | sharkssl_poly1305 (const U8 *data, U32 len, U8 *digest, const U8 key[32]) |
| poly1305 More... | |
| typedef struct SharkSslPoly1305Ctx SharkSslPoly1305Ctx |
POLY1305.
| int sharkssl_poly1305 | ( | const U8 * | data, |
| U32 | len, | ||
| U8 * | digest, | ||
| const U8 | key[32] | ||
| ) |
poly1305
| data | const U8 *; required message buffer. |
| len | U32; message length in bytes; the native one-shot API asserts that it is nonzero. |
| digest | U8 *; required output buffer of at least 16 bytes. |
| key | const U8[32]; required one-time Poly1305 key. Do not reuse it for a different message. |
| void SharkSslPoly1305Ctx_append | ( | SharkSslPoly1305Ctx * | ctx, |
| const U8 * | in, | ||
| U32 | len | ||
| ) |
append
| ctx | SharkSslPoly1305Ctx *; required initialized context, updated in place. |
| in | const U8 *; message bytes, required when len is nonzero. |
| len | U32; input length in bytes. |
| SHARKSSL_API void SharkSslPoly1305Ctx_constructor | ( | SharkSslPoly1305Ctx * | ctx, |
| const U8 | key[32] | ||
| ) |
Initialize.
| ctx | Uninitialized data of size sizeof(SharkSslPoly1305Ctx). |
| key | 16-byte key + 16-byte nonce |
| void SharkSslPoly1305Ctx_finish | ( | SharkSslPoly1305Ctx * | ctx, |
| U8 | digest[SHARKSSL_POLY1305_HASH_LEN] | ||
| ) |
finish
| ctx | SharkSslPoly1305Ctx *; required active context. Finalizes this message; clear the context after use. |
| digest | U8[16]; required caller-owned output tag. |