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 $
11 .\" $DragonFly: src/lib/libmd/ripemd.3,v 1.3 2006/02/17 19:35:07 swildner Exp $
18 .Nm RIPEMD160_Update ,
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_Data "const unsigned char *data" "unsigned int len" "char *buf"
44 functions calculate a 160-bit cryptographic checksum (digest)
45 for any number of input bytes. A cryptographic checksum is a one-way
46 hash function; that is, it is computationally impractical to find
47 the input corresponding to a particular output. This net result is
48 a ``fingerprint'' of the input-data, which doesn't disclose the actual
53 .Fn RIPEMD160_Update ,
56 functions are the core functions. Allocate an RIPEMD160_CTX, initialize it with
58 run over the data with
59 .Fn RIPEMD160_Update ,
60 and finally extract the result using
66 which converts the return value to a 41-character
67 (including the terminating '\e0')
69 string which represents the 160 bits in hexadecimal.
72 calculates the digest of a file, and uses
75 If the file cannot be opened, a null pointer is returned.
77 calculates the digest of a chunk of data in memory, and uses
88 argument can be a null pointer, in which case the returned string
91 and subsequently must be explicitly deallocated using
96 argument is non-null it must point to at least 41 characters of buffer space.
103 These functions appeared in
106 The core hash routines were implemented by Eric Young based on the
111 No method is known to exist which finds two files having the same hash value,
112 nor to find a file with a specific hash value.
113 There is on the other hand no guarantee that such a method doesn't exist.