* SHA-224 finalization. Pads the input data, exports the hash value, * and clears the context state. */
| 338 | * and clears the context state. |
| 339 | */ |
| 340 | void |
| 341 | SHA224_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 |
no test coverage detected