2 .\" ----------------------------------------------------------------------------
3 .\" "THE BEER-WARE LICENSE" (Revision 42):
4 .\" <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
5 .\" can do whatever you want with this stuff. If we meet some day, and you think
6 .\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7 .\" ----------------------------------------------------------------------------
9 .\" From: Id: mdX.3,v 1.14 1999/02/11 20:31:49 wollman Exp
16 .Nm RIPEMD160_Update ,
20 .Nm RIPEMD160_FileChunk ,
22 .Nd calculate the RIPEMD160 message digest
29 .Fn RIPEMD160_Init "RIPEMD160_CTX *context"
31 .Fn RIPEMD160_Update "RIPEMD160_CTX *context" "const unsigned char *data" "unsigned int len"
33 .Fn RIPEMD160_Final "unsigned char digest[20]" "RIPEMD160_CTX *context"
35 .Fn RIPEMD160_End "RIPEMD160_CTX *context" "char *buf"
37 .Fn RIPEMD160_File "const char *filename" "char *buf"
39 .Fn RIPEMD160_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
41 .Fn RIPEMD160_Data "const unsigned char *data" "unsigned int len" "char *buf"
45 functions calculate a 160-bit cryptographic checksum (digest)
46 for any number of input bytes.
47 A cryptographic checksum is a one-way
48 hash function; that is, it is computationally impractical to find
49 the input corresponding to a particular output.
52 of the input-data, which does not disclose the actual input.
56 .Fn RIPEMD160_Update ,
59 functions are the core functions.
64 run over the data with
65 .Fn RIPEMD160_Update ,
66 and finally extract the result using
68 which will also erase the
73 function is a wrapper for
75 which converts the return value to a 41-character
76 (including the terminating '\e0')
77 ASCII string which represents the 160 bits in hexadecimal.
81 function calculates the digest of a file, and uses
84 If the file cannot be opened, a null pointer is returned.
86 .Fn RIPEMD160_FileChunk
87 function is similar to
89 but it only calculates the digest over a byte-range of the file specified,
97 parameter is specified as 0, or more than the length of the remaining part
99 .Fn RIPEMD160_FileChunk
100 calculates the digest from
105 function calculates the digest of a chunk of data in memory, and uses
107 to return the result.
116 argument can be a null pointer, in which case the returned string
119 and subsequently must be explicitly deallocated using
124 argument is non-null it must point to at least 41 characters of buffer space.
128 function called with a null buf argument may fail and return NULL if:
131 Insufficient storage space is available.
137 .Fn RIPEMD160_FileChunk
138 may return NULL when underlying
153 These functions appeared in
156 The core hash routines were implemented by Eric Young based on the
157 published RIPEMD160 specification.
159 No method is known to exist which finds two files having the same hash value,
160 nor to find a file with a specific hash value.
161 There is on the other hand no guarantee that such a method does not exist.