
#use wml::openssl-macros area=docs page=ripemd

<title>Documents, ripemd(3)</title>

<h1>ripemd(3)</h1>

#use wml::imp::generic

{:
## What's this? [[s|(<STRONG>[^<].+?)</A>(</STRONG><DD>)|$1$2|sg]]
[[s|<P>\s+<P>|<P>|sg]]
[[s|<P>\s+</|</|sg]]
[[s|<DD>\s*<DT>|<DD>&nbsp;<DT>|sg]]
[[s|<DD>\s*</DL>|<DD>&nbsp;</DL>|sg]]
[[s|\[|&#91;|sg]]
[[s|\]|&#93;|sg]]

<!-- INDEX BEGIN -->

<UL>

	<LI><A HREF="#NAME">NAME</A>
	<LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
	<LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
	<LI><A HREF="#RETURN_VALUES">RETURN VALUES</A>
	<LI><A HREF="#CONFORMING_TO">CONFORMING TO</A>
	<LI><A HREF="#SEE_ALSO">SEE ALSO</A>
	<LI><A HREF="#HISTORY">HISTORY</A>
</UL>
<!-- INDEX END -->

<HR>
<P>
<HR>
<H1><A NAME="NAME">NAME</A></H1>
<P>
RIPEMD160, RIPEMD160_Init, RIPEMD160_Update, RIPEMD160_Final - RIPEMD-160
hash function

</P>
<P>
<HR>
<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
<PRE> #include &lt;openssl/ripemd.h&gt;
</PRE>
<PRE> unsigned char *RIPEMD160(const unsigned char *d, unsigned long n,
                  unsigned char *md);
</PRE>
<PRE> int RIPEMD160_Init(RIPEMD160_CTX *c);
 int RIPEMD160_Update(RIPEMD_CTX *c, const void *data,
                  unsigned long len);
 int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c);
</PRE>
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
RIPEMD-160 is a cryptographic hash function with a 160 bit output.

</P>
<P>
<CODE>RIPEMD160()</CODE> computes the RIPEMD-160 message digest of the <STRONG>n</STRONG>
bytes at <STRONG>d</STRONG> and places it in <STRONG>md</STRONG> (which must have space for RIPEMD160_DIGEST_LENGTH == 20 bytes of output).
If <STRONG>md</STRONG> is NULL, the digest is placed in a static array.

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

</P>
<P>
<CODE>RIPEMD160_Init()</CODE> initializes a <STRONG>RIPEMD160_CTX</STRONG> structure.

</P>
<P>
<CODE>RIPEMD160_Update()</CODE> can be called repeatedly with chunks of the
message to be hashed (<STRONG>len</STRONG> bytes at <STRONG>data</STRONG>).

</P>
<P>
<CODE>RIPEMD160_Final()</CODE> places the message digest in <STRONG>md</STRONG>, which must have space for RIPEMD160_DIGEST_LENGTH == 20 bytes of output,
and erases the <STRONG>RIPEMD160_CTX</STRONG>.

</P>
<P>
Applications should use the higher level functions
<A HREF="../crypto/EVP_DigestInit.html#">EVP_DigestInit(3)</A> etc. instead of calling the hash functions directly.

</P>
<P>
<HR>
<H1><A NAME="RETURN_VALUES">RETURN VALUES</A></H1>
<P>
<CODE>RIPEMD160()</CODE> returns a pointer to the hash value. 

</P>
<P>
<CODE>RIPEMD160_Init(),</CODE> <CODE>RIPEMD160_Update()</CODE> and
<CODE>RIPEMD160_Final()</CODE> return 1 for success, 0 otherwise.

</P>
<P>
<HR>
<H1><A NAME="CONFORMING_TO">CONFORMING TO</A></H1>
<P>
ISO/IEC 10118-3 (draft) (??)

</P>
<P>
<HR>
<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
<P>
<A HREF="../crypto/sha.html#">sha(3)</A>, <A HREF="../crypto/hmac.html#">hmac(3)</A>, <A HREF="../crypto/EVP_DigestInit.html#">EVP_DigestInit(3)</A>



</P>
<P>
<HR>
<H1><A NAME="HISTORY">HISTORY</A></H1>
<P>
<CODE>RIPEMD160(),</CODE> <CODE>RIPEMD160_Init(),</CODE>
<CODE>RIPEMD160_Update()</CODE> and <CODE>RIPEMD160_Final()</CODE> are
available since SSLeay 0.9.0.

</P>
:}

