RIPEMD160_INIT(3ossl)

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

πŸ’… 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 defining OPENSSL_API_COMPAT with a suitable version value. See openssl_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 a RIPEMD160_CTX structure. Set it up, bestie πŸ’…
  • RIPEMD160_Update() β€” can be called repeatedly with chunks of the message to be hashed (len bytes at data). Feed it piece by piece, it eats πŸ“
  • RIPEMD160_Final() β€” places the message digest in md (which, again, must have space for RIPEMD160_DIGEST_LENGTH == 20 bytes of output), and erases the RIPEMD160_CTX. Clean up after yourself, periodt 🧹

πŸŽ€ RETURN VALUES πŸŽ€

  • RIPEMD160() β€” returns a pointer to the hash value. Iconic 🌈
  • RIPEMD160_Init(), RIPEMD160_Update() and RIPEMD160_Final() β€” return 1 for success, 0 otherwise. 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 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