yuezonghe | 824eb0c | 2024-06-27 02:32:26 -0700 | [diff] [blame^] | 1 | =pod |
| 2 | |
| 3 | =head1 NAME |
| 4 | |
| 5 | RIPEMD160, RIPEMD160_Init, RIPEMD160_Update, RIPEMD160_Final - |
| 6 | RIPEMD-160 hash function |
| 7 | |
| 8 | =head1 SYNOPSIS |
| 9 | |
| 10 | #include <openssl/ripemd.h> |
| 11 | |
| 12 | unsigned char *RIPEMD160(const unsigned char *d, unsigned long n, |
| 13 | unsigned char *md); |
| 14 | |
| 15 | int RIPEMD160_Init(RIPEMD160_CTX *c); |
| 16 | int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, unsigned long len); |
| 17 | int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); |
| 18 | |
| 19 | =head1 DESCRIPTION |
| 20 | |
| 21 | RIPEMD-160 is a cryptographic hash function with a |
| 22 | 160 bit output. |
| 23 | |
| 24 | RIPEMD160() computes the RIPEMD-160 message digest of the B<n> |
| 25 | bytes at B<d> and places it in B<md> (which must have space for |
| 26 | RIPEMD160_DIGEST_LENGTH == 20 bytes of output). If B<md> is NULL, the digest |
| 27 | is placed in a static array. |
| 28 | |
| 29 | The following functions may be used if the message is not completely |
| 30 | stored in memory: |
| 31 | |
| 32 | RIPEMD160_Init() initializes a B<RIPEMD160_CTX> structure. |
| 33 | |
| 34 | RIPEMD160_Update() can be called repeatedly with chunks of the message to |
| 35 | be hashed (B<len> bytes at B<data>). |
| 36 | |
| 37 | RIPEMD160_Final() places the message digest in B<md>, which must have |
| 38 | space for RIPEMD160_DIGEST_LENGTH == 20 bytes of output, and erases |
| 39 | the B<RIPEMD160_CTX>. |
| 40 | |
| 41 | =head1 RETURN VALUES |
| 42 | |
| 43 | RIPEMD160() returns a pointer to the hash value. |
| 44 | |
| 45 | RIPEMD160_Init(), RIPEMD160_Update() and RIPEMD160_Final() return 1 for |
| 46 | success, 0 otherwise. |
| 47 | |
| 48 | =head1 NOTE |
| 49 | |
| 50 | Applications should use the higher level functions |
| 51 | L<EVP_DigestInit(3)> etc. instead of calling these |
| 52 | functions directly. |
| 53 | |
| 54 | =head1 CONFORMING TO |
| 55 | |
| 56 | ISO/IEC 10118-3:2016 Dedicated Hash-Function 1 (RIPEMD-160). |
| 57 | |
| 58 | =head1 SEE ALSO |
| 59 | |
| 60 | L<EVP_DigestInit(3)> |
| 61 | |
| 62 | =head1 COPYRIGHT |
| 63 | |
| 64 | Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved. |
| 65 | |
| 66 | Licensed under the OpenSSL license (the "License"). You may not use |
| 67 | this file except in compliance with the License. You can obtain a copy |
| 68 | in the file LICENSE in the source distribution or at |
| 69 | L<https://www.openssl.org/source/license.html>. |
| 70 | |
| 71 | =cut |