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
17 .Nm RIPEMD160_Update ,
21 .Nm RIPEMD160_FileChunk ,
23 .Nd calculate the RIPEMD160 message digest
30 .Fn RIPEMD160_Init "RIPEMD160_CTX *context"
32 .Fn RIPEMD160_Update "RIPEMD160_CTX *context" "const unsigned char *data" "unsigned int len"
34 .Fn RIPEMD160_Final "unsigned char digest[20]" "RIPEMD160_CTX *context"
36 .Fn RIPEMD160_End "RIPEMD160_CTX *context" "char *buf"
38 .Fn RIPEMD160_File "const char *filename" "char *buf"
40 .Fn RIPEMD160_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
42 .Fn RIPEMD160_Data "const unsigned char *data" "unsigned int len" "char *buf"
46 functions calculate a 160-bit cryptographic checksum (digest)
47 for any number of input bytes.
48 A cryptographic checksum is a one-way
49 hash function; that is, it is computationally impractical to find
50 the input corresponding to a particular output.
53 of the input-data, which does not disclose the actual input.
57 .Fn RIPEMD160_Update ,
60 functions are the core functions.
65 run over the data with
66 .Fn RIPEMD160_Update ,
67 and finally extract the result using
72 function is a wrapper for
74 which converts the return value to a 41-character
75 (including the terminating '\e0')
77 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.
131 These functions appeared in
134 The core hash routines were implemented by Eric Young based on the
139 No method is known to exist which finds two files having the same hash value,
140 nor to find a file with a specific hash value.
141 There is on the other hand no guarantee that such a method does not exist.