EVP_SHA224(3ossl)
β¨ 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 theSHA-2algorithmsSHA-224,SHA-256,SHA-512/224,SHA512/256,SHA-384andSHA-512, and they generate224,256,224,256,384and512bits 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 π
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
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms