Software implementation of the SHA1 algorithm.
Functions | |
void | CL_hash (U8 *msg, int msgBytes, U8 *dest) |
Perform SHA1 hash of data in software. More... | |
void | CL_hashFinal (CL_HashContext *ctx, U8 *dest) |
Complete the SHA1 hash in software and return the digest. More... | |
void | CL_hashInit (CL_HashContext *ctx) |
Initialize context for performing SHA1 hash in software. More... | |
void | CL_hashUpdate (CL_HashContext *ctx, const U8 *src, int nbytes) |
Add arbitrary data to a SHA1 hash. More... | |
void | shaEngine (U32 *buf, U32 *h) |
Perform SHA1 hash of data in software.
[in] | msg | Data to be hashed |
[in] | msgBytes | Data size in bytes |
[out] | dest | Digest is returned here (20 bytes) |
References CL_hashFinal(), CL_hashInit(), and CL_hashUpdate().
void CL_hashFinal | ( | CL_HashContext * | ctx, |
U8 * | dest | ||
) |
Complete the SHA1 hash in software and return the digest.
[in] | ctx | Hash context |
[out] | dest | Digest is returned here (20 bytes) |
References CL_HashContext::buf, CL_HashContext::byteCount, CL_HashContext::byteCountHi, CL_HashContext::h, i, ptr, and shaEngine().
Referenced by atcac_sw_sha1_finish(), and CL_hash().
void CL_hashInit | ( | CL_HashContext * | ctx | ) |
Initialize context for performing SHA1 hash in software.
[in] | ctx | Hash context |
References CL_HashContext::h, and memcpy_P.
Referenced by atcac_sw_sha1_init(), and CL_hash().
void CL_hashUpdate | ( | CL_HashContext * | ctx, |
const U8 * | src, | ||
int | nbytes | ||
) |
Add arbitrary data to a SHA1 hash.
[in] | ctx | Hash context |
[in] | src | Data to be added to the hash |
[in] | nbytes | Data size in bytes |
References CL_HashContext::buf, CL_HashContext::byteCount, CL_HashContext::byteCountHi, CL_HashContext::h, i, and shaEngine().
Referenced by atcac_sw_sha1_update(), and CL_hash().
References leftRotate.
Referenced by CL_hashFinal(), and CL_hashUpdate().