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

Function SHA384_Final

freebsd/crypto/sha2/sha512c.c:455–467  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

453 * and clears the context state.
454 */
455void
456SHA384_Final(unsigned char digest[static SHA384_DIGEST_LENGTH], SHA384_CTX *ctx)
457{
458
459 /* Add padding */
460 SHA512_Pad((SHA512_CTX *)ctx);
461
462 /* Write the hash */
463 be64enc_vect(digest, ctx->state, SHA384_DIGEST_LENGTH);
464
465 /* Clear the context state */
466 explicit_bzero(ctx, sizeof(*ctx));
467}
468
469#ifdef WEAK_REFS
470/* When building libmd, provide weak references. Note: this is not

Callers

nothing calls this directly

Calls 3

explicit_bzeroFunction · 0.85
SHA512_PadFunction · 0.70
be64enc_vectFunction · 0.70

Tested by

no test coverage detected