* SHA-384 finalization. Pads the input data, exports the hash value, * and clears the context state. */
| 453 | * and clears the context state. |
| 454 | */ |
| 455 | void |
| 456 | SHA384_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 |
nothing calls this directly
no test coverage detected