MCPcopy Create free account
hub / github.com/F-Stack/f-stack / SHA224_Final

Function SHA224_Final

freebsd/crypto/sha2/sha256c.c:340–352  ·  view source on GitHub ↗

* SHA-224 finalization. Pads the input data, exports the hash value, * and clears the context state. */

Source from the content-addressed store, hash-verified

338 * and clears the context state.
339 */
340void
341SHA224_Final(unsigned char digest[static SHA224_DIGEST_LENGTH], SHA224_CTX *ctx)
342{
343
344 /* Add padding */
345 SHA256_Pad((SHA256_CTX *)ctx);
346
347 /* Write the hash */
348 be32enc_vect(digest, ctx->state, SHA224_DIGEST_LENGTH);
349
350 /* Clear the context state */
351 explicit_bzero(ctx, sizeof(*ctx));
352}
353
354#ifdef WEAK_REFS
355/* When building libmd, provide weak references. Note: this is not

Callers 1

SHA224_Finalize_fnFunction · 0.50

Calls 3

explicit_bzeroFunction · 0.85
SHA256_PadFunction · 0.70
be32enc_vectFunction · 0.70

Tested by

no test coverage detected