Function esp_idf_sys::mbedtls_sha1

source ยท
pub unsafe extern "C" fn mbedtls_sha1(
    input: *const c_uchar,
    ilen: usize,
    output: *mut c_uchar,
) -> c_int
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.