2 .\" ----------------------------------------------------------------------------
3 .\" "THE BEER-WARE LICENSE" (Revision 42):
4 .\" <phk@login.dkuug.dk> 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
10 .\" $FreeBSD: src/lib/libmd/ripemd.3,v 1.2.2.5 2001/12/17 10:08:31 ru Exp $
17 .Nm RIPEMD160_Update ,
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_Data "const unsigned char *data" "unsigned int len" "char *buf"
43 functions calculate a 160-bit cryptographic checksum (digest)
44 for any number of input bytes. A cryptographic checksum is a one-way
45 hash function; that is, it is computationally impractical to find
46 the input corresponding to a particular output. This net result is
47 a ``fingerprint'' of the input-data, which doesn't disclose the actual
52 .Fn RIPEMD160_Update ,
55 functions are the core functions. Allocate an RIPEMD160_CTX, initialize it with
57 run over the data with
58 .Fn RIPEMD160_Update ,
59 and finally extract the result using
65 which converts the return value to a 41-character
66 (including the terminating '\e0')
68 string which represents the 160 bits in hexadecimal.
71 calculates the digest of a file, and uses
74 If the file cannot be opened, a null pointer is returned.
76 calculates the digest of a chunk of data in memory, and uses
87 argument can be a null pointer, in which case the returned string
90 and subsequently must be explicitly deallocated using
95 argument is non-null it must point to at least 41 characters of buffer space.
102 The core hash routines were implemented by Eric Young based on the
107 These functions appeared in
110 No method is known to exist which finds two files having the same hash value,
111 nor to find a file with a specific hash value.
112 There is on the other hand no guarantee that such a method doesn't exist.