Function esp_idf_hal::sys::mbedtls_poly1305_mac
source ยท pub unsafe extern "C" fn mbedtls_poly1305_mac(
key: *const u8,
input: *const u8,
ilen: usize,
mac: *mut u8,
) -> i32
Expand description
\brief This function calculates the Poly1305 MAC of the input buffer with the provided key.
\warning The key must be unique and unpredictable for each invocation of Poly1305.
\param key The buffer containing the \c 32 Byte (\c 256 Bit) key.
\param ilen The length of the input data in Bytes.
Any value is accepted.
\param input The buffer holding the input data.
This pointer can be \c NULL if ilen == 0
.
\param mac The buffer to where the MAC is written. This must be
a writable buffer of length \c 16 Bytes.
\return \c 0 on success. \return A negative error code on failure.