openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libgcrypt/1.8.4-r0/libgcrypt-1.8.4/cipher/sha256.c
void _gcry_sha256_hash_buffers(void* outbuf, const gcry_buffer_t* iov,
                               int iovcnt)
{
    SHA256_CONTEXT hd;

    sha256_init(&hd, 0);
    for (; iovcnt > 0; iov++, iovcnt--)
        _gcry_md_block_write(&hd, (const char*)iov[0].data + iov[0].off,
                             iov[0].len);
    sha256_final(&hd);
    memcpy(outbuf, hd.bctx.buf, 32);
}
/* Variant of the above shortcut function using multiple buffers.  */
Variant of the above shortcut function using multiple buffers.
Variant of the above shortcut function using multiple buffers .
void _gcry_sha256_hash_buffers(void* outbuf, const gcry_buffer_t* iov,
                               int iovcnt)
{
    SHA256_CONTEXT hd;
    sha256_init(&hd, 0);
    for (; iovcnt > 0; iov++, iovcnt--)
        _gcry_md_block_write(&hd, (const char*)iov[0].data + iov[0].off,
                             iov[0].len);
    sha256_final(&hd);
    memcpy(outbuf, hd.bctx.buf, 32);
}
void _gcry_sha256_hash_buffers ( void * outbuf , const gcry_buffer_t * iov , int iovcnt ) { SHA256_CONTEXT hd ; sha256_init ( & hd , 0 ) ; for ( ; iovcnt > 0 ; iov ++ , iovcnt -- ) _gcry_md_block_write ( & hd , ( const char * ) iov [ 0 ] . data + iov [ 0 ] . off , iov [ 0 ] . len ) ; sha256_final ( & hd ) ; memcpy ( outbuf , hd . bctx . buf , 32 ) ; }
Variant of the above shortcut function using multiple buffers.
Variant of the above shortcut function using multiple buffers .