Function flipper0::ffi::mbedtls_sha1
source · Expand description
\brief This function calculates the SHA-1 checksum of a buffer.
The function allocates the context, performs the
calculation, and frees the context.
The SHA-1 result is calculated as
output = SHA-1(input buffer).
\warning SHA-1 is considered a weak message digest and its use constitutes a security risk. We recommend considering stronger message digests instead.
\param input The buffer holding the input data. This must be a readable buffer of length \p ilen Bytes. \param ilen The length of the input data \p input in Bytes. \param output The SHA-1 checksum result. This must be a writable buffer of length \c 20 Bytes.
\return \c 0 on success. \return A negative error code on failure.