summaryrefslogtreecommitdiff
path: root/lib/libcrypto/man/RIPEMD160.3
blob: 57cff8a9e4cfa76aded41714c53952e4242252a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
.Dd $Mdocdate: November 5 2016 $
.Dt RIPEMD160 3
.Os
.Sh NAME
.Nm RIPEMD160 ,
.Nm RIPEMD160_Init ,
.Nm RIPEMD160_Update ,
.Nm RIPEMD160_Final
.Nd RIPEMD-160 hash function
.Sh SYNOPSIS
.In openssl/ripemd.h
.Ft unsigned char *
.Fo RIPEMD160
.Fa "const unsigned char *d"
.Fa "unsigned long n"
.Fa "unsigned char *md"
.Fc
.Ft int
.Fo RIPEMD160_Init
.Fa "RIPEMD160_CTX *c"
.Fc
.Ft int
.Fo RIPEMD160_Update
.Fa "RIPEMD_CTX *c"
.Fa "const void *data"
.Fa "unsigned long len"
.Fc
.Ft int
.Fo RIPEMD160_Final
.Fa "unsigned char *md"
.Fa "RIPEMD160_CTX *c"
.Fc
.Sh DESCRIPTION
RIPEMD-160 is a cryptographic hash function with a 160 bit output.
.Pp
.Fn RIPEMD160
computes the RIPEMD-160 message digest of the
.Fa n
bytes at
.Fa d
and places it in
.Fa md ,
which must have space for
.Dv RIPEMD160_DIGEST_LENGTH
== 20 bytes of output.
If
.Fa md
is
.Dv NULL ,
the digest is placed in a static array.
.Pp
The following functions may be used if the message is not completely
stored in memory:
.Pp
.Fn RIPEMD160_Init
initializes a
.Vt RIPEMD160_CTX
structure.
.Pp
.Fn RIPEMD160_Update
can be called repeatedly with chunks of the message to be hashed
.Pq Fa len No bytes at Fa data .
.Pp
.Fn RIPEMD160_Final
places the message digest in
.Fa md ,
which must have space for
.Dv RIPEMD160_DIGEST_LENGTH
== 20 bytes of output,
and erases the
.Vt RIPEMD160_CTX .
.Pp
Applications should use the higher level functions
.Xr EVP_DigestInit 3
etc. instead of calling the hash functions directly.
.Sh RETURN VALUES
.Fn RIPEMD160
returns a pointer to the hash value.
.Pp
.Fn RIPEMD160_Init ,
.Fn RIPEMD160_Update ,
and
.Fn RIPEMD160_Final
return 1 for success or 0 otherwise.
.Sh SEE ALSO
.Xr EVP_DigestInit 3 ,
.Xr HMAC 3
.Sh STANDARDS
ISO/IEC 10118-3 (draft) (??)
.Sh HISTORY
.Fn RIPEMD160 ,
.Fn RIPEMD160_Init ,
.Fn RIPEMD160_Update ,
and
.Fn RIPEMD160_Final
are available since SSLeay 0.9.0.