EVP_SHA1(3SSL)

πŸ’– EVP_SHA1 πŸ’–

okay bestie, pull up a chair, we're talking about EVP_sha1 β€” that's the manual page from the 3SSL section btw, so you know it's OpenSSL business πŸŽ€


✨ NAME ✨

EVP_sha1 β€” SHA-1, but make it EVP πŸ’…


🌸 SYNOPSIS 🌸

#include <openssl/evp.h>

const EVP_MD *EVP_sha1(void);

look at her. one include. one function. no drama. iconic behavior honestly 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so SHA-1 stands for Secure Hash Algorithm 1, and she's a cryptographic hash function standardized in NIST FIPS 180-4. the algorithm was designed by the United States National Security Agency and was initially published in 1995 β€” yes, she's a 90s baby and she's still showing up to the function call πŸ’€

  • EVP_sha1() β€” this is the SHA-1 algorithm, and what she does is produce a 160-bit output from a given input. that's it, that's the whole vibe: feed her bytes, she hands you 160 bits back. slay πŸ’–

⚠️ NOTES ⚠️

okay listen up because this part matters, no cap:

developers should be aware of the negative performance implications of calling this function multiple times!!! 😭

the move instead, per the docs, is to consider using EVP_MD_fetch(3) with EVP_MD-SHA1(7) instead. if you want the full tea on it, go read "Performance" in crypto(7) for further information. do your research bestie, your future self will thank you 🧚


πŸ’œ RETURN VALUES πŸ’œ

these functions return an EVP_MD structure that contains the implementation of the message digest. that's your little package of digest-implementation goodness, ready to go ✨


πŸ‘‘ CONFORMING TO πŸ‘‘

NIST FIPS 180-4. she follows the rules, she's a certified good girl 🌟


🌈 SEE ALSO 🌈

go click around, the cross-references are giving study group πŸ“š


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 page bestie!! this whole thing came out of version 4.0.3 dated 2026-09-29, and it lives in the EVP_SHA1(3SSL) corner of the manual. mwah, go hash something responsibly πŸ’‹

πŸ“¦ where this page comes from