|
SharkSSL C/C++ Reference
TLS, cryptography, certificates, and PSA integration
|
#include "SharkSSL.h"Go to the source code of this file.
Functions | |
| SHARKSSL_API int | SharkSslPSAHash_compute (U8 *digest, U16 digestSize, U16 *digestLen, const U8 *data, U32 dataLen, psa_algorithm_t algorithm) |
| One-shot SHA3-224/256/384/512 or fixed SHAKE256-512 through PSA. More... | |
See Choose a SharkSSL API for build scope and the owning API layer.
| int SharkSslPSAHash_compute | ( | U8 * | digest, |
| U16 | digestSize, | ||
| U16 * | digestLen, | ||
| const U8 * | data, | ||
| U32 | dataLen, | ||
| psa_algorithm_t | algorithm | ||
| ) |
One-shot SHA3-224/256/384/512 or fixed SHAKE256-512 through PSA.
After output arguments pass validation, any later failure clears digestSize bytes.
Generic variable-length XOF is deliberately excluded. Returns zero on success; clears digest and returns -1 on failure.
SHAKE256_512 produces a fixed 64-byte result here.
| digest | U8 *; required output buffer. |
| digestSize | U16; output capacity in bytes, at least the selected digest size. |
| digestLen | U16 *; required result byte count; set to zero before validation. |
| data | const U8 *; input bytes, or NULL with dataLen=0. |
| dataLen | U32; input byte count. |
| algorithm | psa_algorithm_t; PSA_ALG_SHA3_224, PSA_ALG_SHA3_256, PSA_ALG_SHA3_384, PSA_ALG_SHA3_512, or PSA_ALG_SHAKE256_512. |