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
17 .Nm RIPEMD160_Update ,
22 .Nd calculate the RIPEMD160 message digest
24 .Fd #include <sys/types.h>
25 .Fd #include <ripemd.h>
27 .Fn RIPEMD160_Init "RIPEMD160_CTX *context"
29 .Fn RIPEMD160_Update "RIPEMD160_CTX *context" "const unsigned char *data" "unsigned int len"
31 .Fn RIPEMD160_Final "unsigned char digest[20]" "RIPEMD160_CTX *context"
33 .Fn RIPEMD160_End "RIPEMD160_CTX *context" "char *buf"
35 .Fn RIPEMD160_File "const char *filename" "char *buf"
37 .Fn RIPEMD160_Data "const unsigned char *data" "unsigned int len" "char *buf"
41 functions calculate a 160-bit cryptographic checksum (digest)
42 for any number of input bytes. A cryptographic checksum is a one-way
43 hash function; that is, it is computationally impractical to find
44 the input corresponding to a particular output. This net result is
45 a ``fingerprint'' of the input-data, which doesn't disclose the actual
50 .Fn RIPEMD160_Update ,
53 functions are the core functions. Allocate an RIPEMD160_CTX, initialize it with
55 run over the data with
56 .Fn RIPEMD160_Update ,
57 and finally extract the result using
63 which converts the return value to a 41-character
64 (including the terminating '\e0')
66 string which represents the 160 bits in hexadecimal.
69 calculates the digest of a file, and uses
72 If the file cannot be opened, a null pointer is returned.
74 calculates the digest of a chunk of data in memory, and uses
85 argument can be a null pointer, in which case the returned string
88 and subsequently must be explicitly deallocated using
93 argument is non-null it must point to at least 41 characters of buffer space.
100 The core hash routines were implemented by Eric Young based on the
105 These functions appeared in
108 No method is known to exist which finds two files having the same hash value,
109 nor to find a file with a specific hash value.
110 There is on the other hand no guarantee that such a method doesn't exist.