BeeCrypt 4.2.1
sha256.h File Reference

SHA-256 hash function, headers. More...

Include dependency graph for sha256.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sha256Param
 Holds all the parameters necessary for the SHA-256 algorithm. More...
 

Functions

void sha256Process (sha256Param *sp)
 This function performs the core of the SHA-256 hash algorithm; it processes a block of 64 bytes.
 
int sha256Reset (sha256Param *sp)
 This function resets the parameter block so that it's ready for a new hash.
 
int sha256Update (sha256Param *sp, const byte *data, size_t size)
 This function should be used to pass successive blocks of data to be hashed.
 
int sha256Digest (sha256Param *sp, byte *digest)
 This function finishes the current hash computation and copies the digest value into digest.
 

Variables

const hashFunction sha256
 Holds the full API description of the SHA-256 algorithm.
 

Detailed Description

SHA-256 hash function, headers.

Author
Bob Deblier bob.d.nosp@m.ebli.nosp@m.er@te.nosp@m.lene.nosp@m.t.be

Function Documentation

◆ sha256Digest()

int sha256Digest ( sha256Param * sp,
byte * digest )

This function finishes the current hash computation and copies the digest value into digest.

Parameters
spThe hash function's parameter block.
digestThe place to store the 32-byte digest.
Return values
0on success.

◆ sha256Process()

void sha256Process ( sha256Param * sp)

This function performs the core of the SHA-256 hash algorithm; it processes a block of 64 bytes.

Parameters
spThe hash function's parameter block.

◆ sha256Reset()

int sha256Reset ( sha256Param * sp)

This function resets the parameter block so that it's ready for a new hash.

Parameters
spThe hash function's parameter block.
Return values
0on success.

◆ sha256Update()

int sha256Update ( sha256Param * sp,
const byte * data,
size_t size )

This function should be used to pass successive blocks of data to be hashed.

Parameters
spThe hash function's parameter block.
data
size
Return values
0on success.

Variable Documentation

◆ sha256

const hashFunction sha256
extern

Holds the full API description of the SHA-256 algorithm.