* SHA-256 finalization. Pads the input data, exports the hash value, * and clears the context state. */
| 288 | * and clears the context state. |
| 289 | */ |
| 290 | void |
| 291 | SHA256_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 | /* |
no test coverage detected