lib_hash_drbg/src/sha256.c
/*
 * Hash a byte array using SHA256, as a single function call
 *
 * Parameters:
 * uint8_t* data        - byte array holding the message
 * uint32_t length      - length of input byte array
 * uint8_t* hash_output - 32 byte output buffer to hold the hash result
 */
Hash a byte array using SHA256, as a single function call
Parameters:
uint8_t* data        - byte array holding the message
uint32_t length      - length of input byte array
uint8_t* hash_output - 32 byte output buffer to hold the hash result
Hash a byte array using SHA256 as a single function call Parameters : uint8_t * data - byte array holding the message uint32_t length - length of input byte array uint8_t * hash_output - 32 byte output buffer to hold the hash result
void
sha256(const uint8_t* in, uint32_t in_len, uint8_t* hash_bytes)
{
    SHA256_CTX context;
    sha256_init    (&context);
    sha256_update  (&context, in, in_len);
    sha256_finalize(&context, hash_bytes);
}
void sha256 ( const uint8_t * in , uint32_t in_len , uint8_t * hash_bytes ) { SHA256_CTX context ; sha256_init ( & context ) ; sha256_update ( & context , in , in_len ) ; sha256_finalize ( & context , hash_bytes ) ; }
Hash a byte array using SHA256, as a single function call
 Parameters:
 uint8_t* data        - byte array holding the message
 uint32_t length      - length of input byte array
 uint8_t* hash_output - 32 byte output buffer to hold the hash result
Hash a byte array using SHA256 as a single function call Parameters : uint8_t * data - byte array holding the message uint32_t length - length of input byte array uint8_t * hash_output - 32 byte output buffer to hold the hash result