xref: /freebsd/crypto/openssl/doc/man3/RIPEMD160_Init.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5e71b7053SJung-uk KimRIPEMD160, RIPEMD160_Init, RIPEMD160_Update, RIPEMD160_Final -
6e71b7053SJung-uk KimRIPEMD-160 hash function
7e71b7053SJung-uk Kim
8e71b7053SJung-uk Kim=head1 SYNOPSIS
9e71b7053SJung-uk Kim
10e71b7053SJung-uk Kim #include <openssl/ripemd.h>
11e71b7053SJung-uk Kim
12*b077aed3SPierre ProncheryThe following functions have been deprecated since OpenSSL 3.0, and can be
13*b077aed3SPierre Proncheryhidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
14*b077aed3SPierre Proncherysee L<openssl_user_macros(7)>:
15*b077aed3SPierre Pronchery
16e71b7053SJung-uk Kim unsigned char *RIPEMD160(const unsigned char *d, unsigned long n,
17e71b7053SJung-uk Kim                          unsigned char *md);
18e71b7053SJung-uk Kim
19e71b7053SJung-uk Kim int RIPEMD160_Init(RIPEMD160_CTX *c);
206935a639SJung-uk Kim int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, unsigned long len);
21e71b7053SJung-uk Kim int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c);
22e71b7053SJung-uk Kim
23e71b7053SJung-uk Kim=head1 DESCRIPTION
24e71b7053SJung-uk Kim
25*b077aed3SPierre ProncheryAll of the functions described on this page are deprecated.
26*b077aed3SPierre ProncheryApplications should instead use L<EVP_DigestInit_ex(3)>, L<EVP_DigestUpdate(3)>
27*b077aed3SPierre Proncheryand L<EVP_DigestFinal_ex(3)>.
28*b077aed3SPierre Pronchery
29e71b7053SJung-uk KimRIPEMD-160 is a cryptographic hash function with a
30e71b7053SJung-uk Kim160 bit output.
31e71b7053SJung-uk Kim
32e71b7053SJung-uk KimRIPEMD160() computes the RIPEMD-160 message digest of the B<n>
33e71b7053SJung-uk Kimbytes at B<d> and places it in B<md> (which must have space for
34e71b7053SJung-uk KimRIPEMD160_DIGEST_LENGTH == 20 bytes of output). If B<md> is NULL, the digest
35e71b7053SJung-uk Kimis placed in a static array.
36e71b7053SJung-uk Kim
37e71b7053SJung-uk KimThe following functions may be used if the message is not completely
38e71b7053SJung-uk Kimstored in memory:
39e71b7053SJung-uk Kim
40e71b7053SJung-uk KimRIPEMD160_Init() initializes a B<RIPEMD160_CTX> structure.
41e71b7053SJung-uk Kim
42e71b7053SJung-uk KimRIPEMD160_Update() can be called repeatedly with chunks of the message to
43e71b7053SJung-uk Kimbe hashed (B<len> bytes at B<data>).
44e71b7053SJung-uk Kim
45e71b7053SJung-uk KimRIPEMD160_Final() places the message digest in B<md>, which must have
46e71b7053SJung-uk Kimspace for RIPEMD160_DIGEST_LENGTH == 20 bytes of output, and erases
47e71b7053SJung-uk Kimthe B<RIPEMD160_CTX>.
48e71b7053SJung-uk Kim
49e71b7053SJung-uk Kim=head1 RETURN VALUES
50e71b7053SJung-uk Kim
51e71b7053SJung-uk KimRIPEMD160() returns a pointer to the hash value.
52e71b7053SJung-uk Kim
53e71b7053SJung-uk KimRIPEMD160_Init(), RIPEMD160_Update() and RIPEMD160_Final() return 1 for
54e71b7053SJung-uk Kimsuccess, 0 otherwise.
55e71b7053SJung-uk Kim
56e71b7053SJung-uk Kim=head1 NOTE
57e71b7053SJung-uk Kim
58e71b7053SJung-uk KimApplications should use the higher level functions
59e71b7053SJung-uk KimL<EVP_DigestInit(3)> etc. instead of calling these
60e71b7053SJung-uk Kimfunctions directly.
61e71b7053SJung-uk Kim
62e71b7053SJung-uk Kim=head1 CONFORMING TO
63e71b7053SJung-uk Kim
64e71b7053SJung-uk KimISO/IEC 10118-3:2016 Dedicated Hash-Function 1 (RIPEMD-160).
65e71b7053SJung-uk Kim
66e71b7053SJung-uk Kim=head1 SEE ALSO
67e71b7053SJung-uk Kim
68e71b7053SJung-uk KimL<EVP_DigestInit(3)>
69e71b7053SJung-uk Kim
70*b077aed3SPierre Pronchery=head1 HISTORY
71*b077aed3SPierre Pronchery
72*b077aed3SPierre ProncheryAll of these functions were deprecated in OpenSSL 3.0.
73*b077aed3SPierre Pronchery
74e71b7053SJung-uk Kim=head1 COPYRIGHT
75e71b7053SJung-uk Kim
76*b077aed3SPierre ProncheryCopyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
77e71b7053SJung-uk Kim
78*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
79e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
80e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
81e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
82e71b7053SJung-uk Kim
83e71b7053SJung-uk Kim=cut
84