RIPEMD160_INIT(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

✨ RIPEMD160_INIT(3ossl) ✨

okay bestie, welcome to the OpenSSL manual page for RIPEMD160_INIT(3ossl) β€” yes, the title is giving very β€œwe are deep in the crypto docs” πŸ’… and we are gonna get through it together.


🌸 NAME 🌸

RIPEMD160, RIPEMD160_Init, RIPEMD160_Update, RIPEMD160_Final β€” the RIPEMD-160 hash function. That’s the whole vibe of this page, bestie 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

First things first, the include:

#include <openssl/ripemd.h>

Now, important deprecation tea: 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):

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);

No cap, those signatures are staying exactly as they are πŸ’–


πŸŽ€ DESCRIPTION πŸŽ€

So all of the functions described on this page are deprecated. Not me being dramatic β€” that’s literally what it says 😭 Applications should instead use EVP_DigestInit_ex(3), EVP_DigestUpdate(3) and EVP_DigestFinal_ex(3).

RIPEMD-160 is a cryptographic hash function with a 160 bit output. Iconic, but old-school β€” and yes, deprecated, so don’t act surprised later πŸ’€

RIPEMD160() computes the RIPEMD-160 message digest of the n bytes at d and places it in md (which must have space for RIPEMD160_DIGEST_LENGTH == 20 bytes of output). If md is NULL, the digest is placed in a static array. The way that md has to be big enough is lowkey a whole thing, so bestie, give it the 20 bytes it needs 🌈

The following functions may be used if the message is not completely stored in memory:

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

that last part is giving β€œclean up after yourself” energy 🧚✨ and honestly? respect.


πŸ’– RETURN VALUES πŸ’–

RIPEMD160() returns a pointer to the hash value.

RIPEMD160_Init(), RIPEMD160_Update() and RIPEMD160_Final() return 1 for success, 0 otherwise.

short, sweet, and very β€œthe math is mathing” πŸ‘‘


πŸ”₯ NOTE πŸ”₯

Applications should use the higher level functions EVP_DigestInit(3) etc. instead of calling these functions directly.

this is the part where the manual is basically saying β€œbestie, use the higher-level API, please” 😭 no cap, it’s for your own good.


🌈 CONFORMING TO 🌈

ISO/IEC 10118-3:2016 Dedicated Hash-Function 1 (RIPEMD-160).

standardized and everything β€” she’s got paperwork πŸ’…πŸ“„


🫢 SEE ALSO 🫢

EVP_DigestInit(3)

that’s the one to go look at instead, iykyk ✨


πŸ’œ HISTORY πŸ’œ

All of these functions were deprecated in OpenSSL 3.0.

so yeah, they’re not new here β€” they’ve been in their deprecated era for a minute πŸ•°οΈπŸ’€


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


mwah πŸ’‹ β€” this page is from OpenSSL 3.5.0, dated 2026-09-25, and that’s the cute little sign-off, bestie πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from