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

Function SHA256_Final

freebsd/crypto/sha2/sha256c.c:290–302  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

288 * and clears the context state.
289 */
290void
291SHA256_Final(unsigned char digest[static SHA256_DIGEST_LENGTH], SHA256_CTX *ctx)
292{
293
294 /* Add padding */
295 SHA256_Pad(ctx);
296
297 /* Write the hash */
298 be32enc_vect(digest, ctx->state, SHA256_DIGEST_LENGTH);
299
300 /* Clear the context state */
301 explicit_bzero(ctx, sizeof(*ctx));
302}
303
304/*** SHA-224: *********************************************************/
305/*

Callers 4

SHA256_Finalize_fnFunction · 0.50
verify_digestFunction · 0.50
arc4random.cFile · 0.50
kerneldumpcrypto_initFunction · 0.50

Calls 3

explicit_bzeroFunction · 0.85
SHA256_PadFunction · 0.70
be32enc_vectFunction · 0.70

Tested by

no test coverage detected