libc: make stdio_impl.h an internal libc header
[unleashed/tickless.git] / lib / libcrypto / man / RIPEMD160.3
blob51787b0cfaaa4df4060e9f2b7c455a38e3ee86be
1 .\"     $OpenBSD: RIPEMD160.3,v 1.4 2016/11/29 14:51:09 schwarze Exp $
2 .\"     OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
3 .\"
4 .\" This file was written by Ulf Moeller <ulf@openssl.org>.
5 .\" Copyright (c) 2000, 2006, 2014 The OpenSSL Project.  All rights reserved.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\"
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\"    notice, this list of conditions and the following disclaimer.
13 .\"
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\"    notice, this list of conditions and the following disclaimer in
16 .\"    the documentation and/or other materials provided with the
17 .\"    distribution.
18 .\"
19 .\" 3. All advertising materials mentioning features or use of this
20 .\"    software must display the following acknowledgment:
21 .\"    "This product includes software developed by the OpenSSL Project
22 .\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23 .\"
24 .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
25 .\"    endorse or promote products derived from this software without
26 .\"    prior written permission. For written permission, please contact
27 .\"    openssl-core@openssl.org.
28 .\"
29 .\" 5. Products derived from this software may not be called "OpenSSL"
30 .\"    nor may "OpenSSL" appear in their names without prior written
31 .\"    permission of the OpenSSL Project.
32 .\"
33 .\" 6. Redistributions of any form whatsoever must retain the following
34 .\"    acknowledgment:
35 .\"    "This product includes software developed by the OpenSSL Project
36 .\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
37 .\"
38 .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
39 .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
40 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
41 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
42 .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
45 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
46 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
47 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49 .\" OF THE POSSIBILITY OF SUCH DAMAGE.
50 .\"
51 .Dd $Mdocdate: November 29 2016 $
52 .Dt RIPEMD160 3
53 .Os
54 .Sh NAME
55 .Nm RIPEMD160 ,
56 .Nm RIPEMD160_Init ,
57 .Nm RIPEMD160_Update ,
58 .Nm RIPEMD160_Final
59 .Nd RIPEMD-160 hash function
60 .Sh SYNOPSIS
61 .In openssl/ripemd.h
62 .Ft unsigned char *
63 .Fo RIPEMD160
64 .Fa "const unsigned char *d"
65 .Fa "unsigned long n"
66 .Fa "unsigned char *md"
67 .Fc
68 .Ft int
69 .Fo RIPEMD160_Init
70 .Fa "RIPEMD160_CTX *c"
71 .Fc
72 .Ft int
73 .Fo RIPEMD160_Update
74 .Fa "RIPEMD_CTX *c"
75 .Fa "const void *data"
76 .Fa "unsigned long len"
77 .Fc
78 .Ft int
79 .Fo RIPEMD160_Final
80 .Fa "unsigned char *md"
81 .Fa "RIPEMD160_CTX *c"
82 .Fc
83 .Sh DESCRIPTION
84 RIPEMD-160 is a cryptographic hash function with a 160-bit output.
85 .Pp
86 .Fn RIPEMD160
87 computes the RIPEMD-160 message digest of the
88 .Fa n
89 bytes at
90 .Fa d
91 and places it in
92 .Fa md ,
93 which must have space for
94 .Dv RIPEMD160_DIGEST_LENGTH
95 == 20 bytes of output.
97 .Fa md
99 .Dv NULL ,
100 the digest is placed in a static array.
102 The following functions may be used if the message is not completely
103 stored in memory:
105 .Fn RIPEMD160_Init
106 initializes a
107 .Vt RIPEMD160_CTX
108 structure.
110 .Fn RIPEMD160_Update
111 can be called repeatedly with chunks of the message to be hashed
112 .Pq Fa len No bytes at Fa data .
114 .Fn RIPEMD160_Final
115 places the message digest in
116 .Fa md ,
117 which must have space for
118 .Dv RIPEMD160_DIGEST_LENGTH
119 == 20 bytes of output,
120 and erases the
121 .Vt RIPEMD160_CTX .
123 Applications should use the higher level functions
124 .Xr EVP_DigestInit 3
125 etc. instead of calling the hash functions directly.
126 .Sh RETURN VALUES
127 .Fn RIPEMD160
128 returns a pointer to the hash value.
130 .Fn RIPEMD160_Init ,
131 .Fn RIPEMD160_Update ,
133 .Fn RIPEMD160_Final
134 return 1 for success or 0 otherwise.
135 .Sh SEE ALSO
136 .Xr EVP_DigestInit 3 ,
137 .Xr HMAC 3
138 .Sh STANDARDS
139 ISO/IEC 10118-3 (draft) (??)
140 .Sh HISTORY
141 .Fn RIPEMD160 ,
142 .Fn RIPEMD160_Init ,
143 .Fn RIPEMD160_Update ,
145 .Fn RIPEMD160_Final
146 are available since SSLeay 0.9.0.