mbedtls_sha512_ret() function
This function calculates the SHA-512 or SHA-384 checksum of a buffer. The function allocates the context, performs the calculation, and frees the context. The SHA-512 result is calculated as output = SHA-512(input buffer).
int mbedtls_sha512_ret( const unsigned char *input,
size_t ilen,
unsigned char output[64],
int is384 );
Arguments
The buffer holding the input data. This must be a readable buffer of length \p ilen Bytes.
ilen
The length of the input data in Bytes.
output
The SHA-384 or SHA-512 checksum result. This must be a writable buffer of length \c 64 Bytes.
is384
Determines which function to use. This must be either \c 0 for SHA-512, or \c 1 for SHA-384.
Return value
\c 0 on success. A negative error code on failure.
Functions calling mbedtls_sha512_ret()
Functions called by mbedtls_sha512_ret()
mbedtls_sha512_ret()
Data read by mbedtls_sha512_ret()
Data written by mbedtls_sha512_ret()
mbedtls_sha512_ret()::ret all items filtered out
mbedtls_sha512_ret()
mbedtls_sha512_ret()::ret all items filtered out
Type of mbedtls_sha512_ret()
mbedtls_sha512_ret()