mbedtls_sha512_ret() is only used within mbedTLS.
 
Symbols
loading...
Files
loading...

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).

Syntax

int mbedtls_sha512_ret( const unsigned char *input,     size_t ilen,     unsigned char output[64],     int is384 );
Implemented in sha512.c:444

Arguments

input

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.

References

LocationReferrerText
sha512.c:444
int mbedtls_sha512_ret( const unsigned char *input,
sha512.h:245
int mbedtls_sha512_ret( const unsigned char *input,
entropy.c:192entropy_update()
if( ( ret = mbedtls_sha512_ret( data, len, tmp, 0 ) ) != 0 )
entropy.c:398mbedtls_entropy_func()
if( ( ret = mbedtls_sha512_ret( buf, MBEDTLS_ENTROPY_BLOCK_SIZE,
md_wrap.c:512sha384_wrap()
return( mbedtls_sha512_ret( input, ilen, output, 1 ) );
md_wrap.c:566sha512_wrap()
return( mbedtls_sha512_ret( input, ilen, output, 0 ) );
sha512.c:479mbedtls_sha512()
mbedtls_sha512_ret( input, ilen, output, is384 );

Call Tree

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()
mbedtls_sha512_ret()::ret
all items filtered out
Type of mbedtls_sha512_ret()
mbedtls_sha512_ret()
all items filtered out