xref: /onnv-gate/usr/src/common/openssl/doc/crypto/ripemd.pod (revision 2175:b0b2f052a486)
1*2175Sjp161948=pod
2*2175Sjp161948
3*2175Sjp161948=head1 NAME
4*2175Sjp161948
5*2175Sjp161948RIPEMD160, RIPEMD160_Init, RIPEMD160_Update, RIPEMD160_Final -
6*2175Sjp161948RIPEMD-160 hash function
7*2175Sjp161948
8*2175Sjp161948=head1 SYNOPSIS
9*2175Sjp161948
10*2175Sjp161948 #include <openssl/ripemd.h>
11*2175Sjp161948
12*2175Sjp161948 unsigned char *RIPEMD160(const unsigned char *d, unsigned long n,
13*2175Sjp161948                  unsigned char *md);
14*2175Sjp161948
15*2175Sjp161948 void RIPEMD160_Init(RIPEMD160_CTX *c);
16*2175Sjp161948 void RIPEMD160_Update(RIPEMD_CTX *c, const void *data,
17*2175Sjp161948                  unsigned long len);
18*2175Sjp161948 void RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c);
19*2175Sjp161948
20*2175Sjp161948=head1 DESCRIPTION
21*2175Sjp161948
22*2175Sjp161948RIPEMD-160 is a cryptographic hash function with a
23*2175Sjp161948160 bit output.
24*2175Sjp161948
25*2175Sjp161948RIPEMD160() computes the RIPEMD-160 message digest of the B<n>
26*2175Sjp161948bytes at B<d> and places it in B<md> (which must have space for
27*2175Sjp161948RIPEMD160_DIGEST_LENGTH == 20 bytes of output). If B<md> is NULL, the digest
28*2175Sjp161948is placed in a static array.
29*2175Sjp161948
30*2175Sjp161948The following functions may be used if the message is not completely
31*2175Sjp161948stored in memory:
32*2175Sjp161948
33*2175Sjp161948RIPEMD160_Init() initializes a B<RIPEMD160_CTX> structure.
34*2175Sjp161948
35*2175Sjp161948RIPEMD160_Update() can be called repeatedly with chunks of the message to
36*2175Sjp161948be hashed (B<len> bytes at B<data>).
37*2175Sjp161948
38*2175Sjp161948RIPEMD160_Final() places the message digest in B<md>, which must have
39*2175Sjp161948space for RIPEMD160_DIGEST_LENGTH == 20 bytes of output, and erases
40*2175Sjp161948the B<RIPEMD160_CTX>.
41*2175Sjp161948
42*2175Sjp161948Applications should use the higher level functions
43*2175Sjp161948L<EVP_DigestInit(3)|EVP_DigestInit(3)> etc. instead of calling the
44*2175Sjp161948hash functions directly.
45*2175Sjp161948
46*2175Sjp161948=head1 RETURN VALUES
47*2175Sjp161948
48*2175Sjp161948RIPEMD160() returns a pointer to the hash value.
49*2175Sjp161948
50*2175Sjp161948RIPEMD160_Init(), RIPEMD160_Update() and RIPEMD160_Final() do not
51*2175Sjp161948return values.
52*2175Sjp161948
53*2175Sjp161948=head1 CONFORMING TO
54*2175Sjp161948
55*2175Sjp161948ISO/IEC 10118-3 (draft) (??)
56*2175Sjp161948
57*2175Sjp161948=head1 SEE ALSO
58*2175Sjp161948
59*2175Sjp161948L<sha(3)|sha(3)>, L<hmac(3)|hmac(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)>
60*2175Sjp161948
61*2175Sjp161948=head1 HISTORY
62*2175Sjp161948
63*2175Sjp161948RIPEMD160(), RIPEMD160_Init(), RIPEMD160_Update() and
64*2175Sjp161948RIPEMD160_Final() are available since SSLeay 0.9.0.
65*2175Sjp161948
66*2175Sjp161948=cut
67