RIPEMD160_INIT(3ossl)
π RIPEMD160_INIT(3ossl) β the OpenSSL manual, but make it make sense π«Ά
Okay bestie, so this page lives in the OpenSSL manual, section 3ossl, and it's all about the RIPEMD-160 hash function. It's giving "legacy but still iconic" energy, so buckle up π
β¨ NAME β¨
RIPEMD160, RIPEMD160_Init, RIPEMD160_Update, RIPEMD160_Final β the RIPEMD-160 hash function. Yes, all five-ish names for one vibe π
πΈ SYNOPSIS πΈ
First thing's first, bestie β you gotta include the header:
#include <openssl/ripemd.h>
π¨ Heads up, queen: the following functions have been deprecated since OpenSSL 3.0, and can be hidden entirely by definingOPENSSL_API_COMPATwith a suitable version value. Seeopenssl_user_macros(7)for the deets. So like... they're still here, but they're on thin ice π
Here are the function signatures, exactly as they appear:
unsigned char *RIPEMD160(const unsigned char *d, unsigned long n,
unsigned char *md);
int RIPEMD160_Init(RIPEMD160_CTX *c);
int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, unsigned long len);
int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c);
π¦ DESCRIPTION π¦
So like β all of the functions on this page are deprecated. I'm not saying it, the manpage is saying it π Applications should instead use EVP_DigestInit_ex(3), EVP_DigestUpdate(3) and EVP_DigestFinal_ex(3). That's the glow-up, okay? β¨
RIPEMD-160 is a cryptographic hash function with a 160 bit output. Short, sweet, and to the point.
RIPEMD160() computes the RIPEMD-160 message digest of the n bytes at d and places it in md β and md must have space for RIPEMD160_DIGEST_LENGTH == 20 bytes of output. No skimping on the buffer, bestie π«Ά If md is NULL, the digest is placed in a static array. (iykyk, static arrays are a whole vibe π)
Now, the following functions are your go-to if the message is not completely stored in memory β like when you're streaming data in chunks:
RIPEMD160_Init()β initializes aRIPEMD160_CTXstructure. Set it up, bestie πRIPEMD160_Update()β can be called repeatedly with chunks of the message to be hashed (lenbytes atdata). Feed it piece by piece, it eats πRIPEMD160_Final()β places the message digest inmd(which, again, must have space forRIPEMD160_DIGEST_LENGTH == 20bytes of output), and erases theRIPEMD160_CTX. Clean up after yourself, periodt π§Ή
π RETURN VALUES π
RIPEMD160()β returns a pointer to the hash value. Iconic πRIPEMD160_Init(),RIPEMD160_Update()andRIPEMD160_Final()β return1for success,0otherwise. Simple as that π
π NOTE π
Applications should use the higher level functions β EVP_DigestInit(3) etc. β instead of calling these functions directly. Like, these are the training wheels, and you're ready for the real thing, bestie π
β CONFORMING TO β
ISO/IEC 10118-3:2016 Dedicated Hash-Function 1 (RIPEMD-160). Look at it, all official and certified πβ¨
π₯ SEE ALSO π₯
EVP_DigestInit(3) β go read that one next, it's the main character energy this page is pointing you toward π
πΈ HISTORY πΈ
All of these functions were deprecated in OpenSSL 3.0. Sad but true, they had a good run π₯²
π«Ά COPYRIGHT π«Ά
Copyright 2000-2020 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> π
π cute lil sign-off
This page is from OpenSSL 3.5.6, dated 2026-04-07, and it's filed under RIPEMD160_INIT(3ossl). Okay that's the whole manual page, love you, bye bestie πβ¨π¦
π¦ 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