EVP_SHA224(3ossl)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 15.1

✨ EVP_SHA224 β€” SHA-2 For EVP ✨

Okay bestie, gather round, because this is the <pink>OpenSSL</pink> manual page for the SHA-2 family and it's genuinely so iconic. We're talking EVP_SHA224 from the 3ossl manual, and yes, it's giving cryptography main character energy. πŸ’…


🌸 SYNOPSIS 🌸

Like, just include the header and you're literally set:

#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_sha512_256(void);
const EVP_MD *EVP_sha384(void);
const EVP_MD *EVP_sha512(void);

(ok the fourth line in the original is const EVP_MD *EVP_sha512_256(void); β€” I'm not gonna rewrite the code, code is sacred, so here it is exactly, bestie:)

const EVP_MD *EVP_sha512_256(void);

πŸ¦‹ DESCRIPTION πŸ¦‹

So SHA-2 (Secure Hash Algorithm 2) is this whole family of cryptographic hash functions, standardized in NIST FIPS 180-4, and it first got published in 2001. Like, it's been slaying for literal decades. πŸ‘‘

πŸ’– The functions, explained

  • EVP_sha224(), EVP_sha256(), EVP_sha512_224, EVP_sha512_256, EVP_sha384(), EVP_sha512() β€” these are the SHA-2 algorithms SHA-224, SHA-256, SHA-512/224, SHA512/256, SHA-384 and SHA-512, and they generate 224, 256, 224, 256, 384 and 512 bits respectively of output from a given input. So many bits, so little time. πŸŽ€

And listen, the two algorithms SHA-512/224 and SHA512/256 are truncated forms of the SHA-512 algorithm. The way that matters: they are distinct from SHA-224 and SHA-256 even though their outputs are of the same size. Do not @ me, do not confuse them, they are different girls. πŸ’€


⭐ NOTES ⭐

Real talk, bestie 🫢 β€” developers should be aware of the negative performance implications of calling these functions multiple times. Like, it's lowkey a vibe killer for your perf. Instead, consider using EVP_MD_fetch(3) with EVP_MD-SHA2(7) instead. And for the full tea, see "Performance" in crypto(7). ✨


🌈 RETURN VALUES 🌈

These functions return a EVP_MD structure that contains the implementation of the message digest. If you wanna know the details of the EVP_MD structure, go peek at EVP_MD_meth_new(3). It's all there, iykyk. πŸ¦‹


πŸ‘‘ CONFORMING TO πŸ‘‘

NIST FIPS 180-4. That's it, that's the whole section. Periodt. πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

Go read them, bestie, they're literally so good. πŸ“š


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>.

⚠️ Okay but fr fr, don't skip the license, it's not a suggestion, it's the rules. πŸ™ˆ

And that's the whole page, bestie! 🧚 This was OpenSSL 3.5.6, dated 2026-04-07, and honestly? She ate. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from