mbedtls_sha3() function
This function calculates the SHA-3 checksum of a buffer. The function allocates the context, performs the calculation, and frees the context. The SHA-3 result is calculated as output = SHA-3(id, input buffer, d).
Arguments
id
The id of the SHA-3 family.
input
The buffer holding the data. This must be a readable buffer of length \p ilen Bytes.
ilen
The length of the input data in Bytes.
output
The SHA-3 checksum result. This must be a writable buffer of length \c olen bytes.
olen
Defines the length of output buffer (in bytes). For SHA-3 224, SHA-3 256, SHA-3 384 and SHA-3 512 \c olen must equal to 28, 32, 48 and 64, respectively.
Return value
\c 0 on success. A negative error code on failure.