lib_hash_drbg/src/sha256.c
/*
 * Initialize the sha256 context buffer
 *  FIPS180-4, Sec. 5.3.3 (pg. 15)
 *
 * Parameters:
 * SHA256_CTX* context - structure holding the sha256 context
 */
Initialize the sha256 context buffer
FIPS180-4, Sec.

SHA256_CTX* context - structure holding the sha256 context
Initialize the sha256 context buffer FIPS180 - 4 Sec . SHA256_CTX * context - structure holding the sha256 context
void
sha256_init(SHA256_CTX* context)
{
    context->datalen = 0;
    context->bitlen  = 0;
    context->H[0] = 0x6a09e667;
    context->H[1] = 0xbb67ae85;
    context->H[2] = 0x3c6ef372;
    context->H[3] = 0xa54ff53a;
    context->H[4] = 0x510e527f;
    context->H[5] = 0x9b05688c;
    context->H[6] = 0x1f83d9ab;
    context->H[7] = 0x5be0cd19;
}
void sha256_init ( SHA256_CTX * context ) { context -> datalen = 0 ; context -> bitlen = 0 ; context -> H [ 0 ] = 0x6a09e667 ; context -> H [ 1 ] = 0xbb67ae85 ; context -> H [ 2 ] = 0x3c6ef372 ; context -> H [ 3 ] = 0xa54ff53a ; context -> H [ 4 ] = 0x510e527f ; context -> H [ 5 ] = 0x9b05688c ; context -> H [ 6 ] = 0x1f83d9ab ; context -> H [ 7 ] = 0x5be0cd19 ; }
Initialize the sha256 context buffer
  FIPS180-4, Sec.
Initialize the sha256 context buffer FIPS180 - 4 Sec .