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

Function SHA512_Final

freebsd/crypto/sha2/sha512c.c:323–335  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

321 * and clears the context state.
322 */
323void
324SHA512_Final(unsigned char digest[static SHA512_DIGEST_LENGTH], SHA512_CTX *ctx)
325{
326
327 /* Add padding */
328 SHA512_Pad(ctx);
329
330 /* Write the hash */
331 be64enc_vect(digest, ctx->state, SHA512_DIGEST_LENGTH);
332
333 /* Clear the context state */
334 explicit_bzero(ctx, sizeof(*ctx));
335}
336
337/*** SHA-512t: *********************************************************/
338/*

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