EVP_SHA224(3SSL)
β¨ NAME β¨
EVP_sha224, EVP_sha256, EVP_sha512_224, EVP_sha512_256, EVP_sha384, EVP_sha512 β bestie, it's the SHA-2 family, but for EVP π
(quick vibe check: this page lives in the OpenSSL manual, section 3SSL π)
πΈ SYNOPSIS πΈ
#include <openssl/evp.h>
const EVP_MD *EVP_sha224(void);
const EVP_MD *EVP_sha256(void);
const EVP_MD *EVP_sha512_224(void);
const EVP_MD *EVP_sha512_256(void);
const EVP_MD *EVP_sha384(void);
const EVP_MD *EVP_sha512(void);
π DESCRIPTION π
okay so, SHA-2 (that's Secure Hash Algorithm 2, the glow-up sequel β¨) is a whole family of cryptographic hash functions. It got standardized in NIST FIPS 180-4 and first showed up on the scene in 2001. iconic behavior, honestly π
EVP_sha224(), EVP_sha256(), EVP_sha512_224, EVP_sha512_256, EVP_sha384(), EVP_sha512()
- These are the SHA-2 SHA-224, SHA-256, SHA-512/224, SHA512/256, SHA-384 and SHA-512 algorithms, and the way they work is: you hand them some input, they hand you back 224, 256, 224, 256, 384 and 512 bits of output respectively. In that order. Matching up. Yes bestie, the numbers line up one-for-one with the algorithm names π«Ά
- Now the tea on the last two: SHA-512/224 and SHA512/256 are truncated forms of the SHA-512 algorithm. And before you say "wait, but they're the same size as SHA-224 and SHA-256"β¦ no. They are
distinctfrom SHA-224 and SHA-256 even though their outputs are of the same size. Same size β same algorithm, periodt π
π NOTES π
Real talk, developers: these functions have negative performance implications when you call them multiple times. So maybe don't spam them like a group chat at 2am π. Consider using EVP_MD_fetch(3) with EVP_MD-SHA2(7) instead. And if you want the full lore, go read the "Performance" section in crypto(7). iykyk.
π RETURN VALUES π
These functions return a EVP_MD structure that contains the implementation of the message digest. That's it, that's the whole return. slay β¨
π CONFORMING TO π
NIST FIPS 180-4. we stay compliant π
π¦ SEE ALSO π¦
π COPYRIGHT π
Copyright 2017-2023 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
and that's the whole page bestie, ily, go hash something responsibly ππ§
this was OpenSSL 4.0.3, dated 2026-09-29, from the EVP_SHA224(3SSL) page β mwah π
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms