RIPEMD160_INIT(3ossl)

πŸ’– RIPEMD160_INIT πŸ’–

okay bestie, this is a page from the OpenSSL manual β€” like, section 3ossl, the crypto-library corner of the man-page universe. and babes, I have to tell you upfront: everything on this page is deprecated. I'm not being dramatic, the page literally says it. but you're here, so let's learn it anyway 🫢


✨ NAME ✨

RIPEMD160, RIPEMD160_Init, RIPEMD160_Update, RIPEMD160_Final β€” the RIPEMD-160 hash function 🌸


πŸŽ€ SYNOPSIS πŸŽ€

#include <openssl/ripemd.h>

so here's the tea, bestie: the following functions have been deprecated since OpenSSL 3.0, and you can hide them entirely by defining OPENSSL_API_COMPAT with a suitable version value. (peep openssl_user_macros(7) for that whole situation πŸ‘€)

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 πŸ¦‹

okay so. every single function on this page is deprecated. all of them. not me being the bearer of bad news 😭

if you're writing an app, you should use EVP_DigestInit_ex(3), EVP_DigestUpdate(3) and EVP_DigestFinal_ex(3) instead. that's the glow-up, that's the main character path ✨

now for the actual lore: RIPEMD-160 is a cryptographic hash function with a 160 bit output. πŸ’…

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 cap. and if md is NULL? the digest gets placed in a static array. iconic behaviour, honestly.

🌈 the streaming girlies

the following functions may be used if the message is not completely stored in memory (iykyk, chunk by chunk energy):

  • RIPEMD160_Init() initializes a RIPEMD160_CTX structure. πŸŽ€
  • RIPEMD160_Update() can be called repeatedly with chunks of the message to be hashed (len bytes at data). feed it, bestie πŸ“
  • RIPEMD160_Final() places the message digest in md β€” which must have space for RIPEMD160_DIGEST_LENGTH == 20 bytes of output β€” and erases the RIPEMD160_CTX. it's giving cleanup era 🧹✨

πŸ‘‘ RETURN VALUES πŸ‘‘

  • RIPEMD160() returns a pointer to the hash value. 🫢
  • RIPEMD160_Init(), RIPEMD160_Update() and RIPEMD160_Final() return 1 for success, 0 otherwise.

πŸ’€ NOTE πŸ’€

applications should use the higher level functions EVP_DigestInit(3) etc. instead of calling these functions directly. I'm just the messenger, don't shoot πŸ’…


⭐ CONFORMING TO ⭐

ISO/IEC 10118-3:2016 Dedicated Hash-Function 1 (RIPEMD-160). certified, standardized, ate πŸ’…βœ¨


πŸ”₯ SEE ALSO πŸ”₯


🌸 HISTORY 🌸

all of these functions were deprecated in OpenSSL 3.0. every last one. it's giving retirement party πŸ˜­πŸŽ€


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


and that's the whole page, bestie 🫢 this was OpenSSL 3.5.9, dated 2026-09-29 β€” go forth, hash responsibly, and please use EVP instead πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from