RIPEMD-160 is another hash function; it computes a 160-bit message digest.

There is a RIPEMD-160 home page, with test vectors and pseudocode for RIPEMD-160.
For padding the message, RIPEMD-160 acts like MD4 (RFC 1320).

Find the RIPEMD-160 message digest of a string of octets.
Use the ASCII encoded string “Rosetta Code”.
You may either call an RIPEMD-160 library, or implement RIPEMD-160 in your language.

#include <pari/pari.h>
#include <openssl/ripemd.h>
 
#define HEX(x)  (((x) < 10)? (x)+'0': (x)-10+'a')
 
GEN plug_ripemd160(char *text)
{
  char md[RIPEMD160_DIGEST_LENGTH];
  char hash[sizeof(md) * 2 + 1];
  int i;
 
  RIPEMD160((unsigned char*)text, strlen(text), (unsigned char*)md);
 
  for (i = 0; i < sizeof(md); i++) {
    hash[i+i]   = HEX((md[i] >> 4) & 0x0f);
    hash[i+i+1] = HEX(md[i] & 0x0f);
  }
 
  hash[sizeof(md) * 2] = 0;
 
  return strtoGENstr(hash);
}