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

mbedtls_sha256_ret() function

This function calculates the SHA-224 or SHA-256 checksum of a buffer. The function allocates the context, performs the calculation, and frees the context. The SHA-256 result is calculated as output = SHA-256(input buffer).

Syntax

int mbedtls_sha256_ret( const unsigned char *input,     size_t ilen,     unsigned char output[32],     int is224 );
Implemented in sha256.c:412

Arguments

input

The buffer holding the data. This must be a readable buffer of length \p ilen Bytes.

ilen

The length of the input data in Bytes.

output

The SHA-224 or SHA-256 checksum result. This must be a writable buffer of length \c 32 Bytes.

is224

Determines which function to use. This must be either \c 0 for SHA-256, or \c 1 for SHA-224.

References

LocationReferrerText
sha256.c:412
int mbedtls_sha256_ret( const unsigned char *input,
sha256.h:241
int mbedtls_sha256_ret( const unsigned char *input,
md_wrap.c:415sha224_wrap()
return( mbedtls_sha256_ret( input, ilen, output, 1 ) );
md_wrap.c:469sha256_wrap()
return( mbedtls_sha256_ret( input, ilen, output, 0 ) );
sha256.c:447mbedtls_sha256()
mbedtls_sha256_ret( input, ilen, output, is224 );

Call Tree

Functions calling mbedtls_sha256_ret()
Functions called by mbedtls_sha256_ret()
mbedtls_sha256_ret()
Data read by mbedtls_sha256_ret()
Data written by mbedtls_sha256_ret()
mbedtls_sha256_ret()
mbedtls_sha256_ret()::ret
all items filtered out
Type of mbedtls_sha256_ret()
mbedtls_sha256_ret()
all items filtered out