summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/MD5.3
diff options
context:
space:
mode:
authorschwarze <>2016-11-03 10:02:57 +0000
committerschwarze <>2016-11-03 10:02:57 +0000
commit05264184755e9ad926b368969ae307f8b4784f6e (patch)
treee46d47f822cc196cab18580b945e031bb59a4186 /src/lib/libcrypto/man/MD5.3
parent4d607f17ea3eb38ed9f7703afd423f6055c686d4 (diff)
downloadopenbsd-05264184755e9ad926b368969ae307f8b4784f6e.tar.gz
openbsd-05264184755e9ad926b368969ae307f8b4784f6e.tar.bz2
openbsd-05264184755e9ad926b368969ae307f8b4784f6e.zip
convert HMAC and MD5 manuals from pod to mdoc
Diffstat (limited to 'src/lib/libcrypto/man/MD5.3')
-rw-r--r--src/lib/libcrypto/man/MD5.3184
1 files changed, 184 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/MD5.3 b/src/lib/libcrypto/man/MD5.3
new file mode 100644
index 0000000000..b0053c1acd
--- /dev/null
+++ b/src/lib/libcrypto/man/MD5.3
@@ -0,0 +1,184 @@
1.Dd $Mdocdate: November 3 2016 $
2.Dt MD5 3
3.Os
4.Sh NAME
5.Nm MD2 ,
6.Nm MD4 ,
7.Nm MD5 ,
8.Nm MD2_Init ,
9.Nm MD2_Update ,
10.Nm MD2_Final ,
11.Nm MD4_Init ,
12.Nm MD4_Update ,
13.Nm MD4_Final ,
14.Nm MD5_Init ,
15.Nm MD5_Update ,
16.Nm MD5_Final
17.Nd MD2, MD4, and MD5 hash functions
18.Sh SYNOPSIS
19.In openssl/md2.h
20.Ft unsigned char *
21.Fo MD2
22.Fa "const unsigned char *d"
23.Fa "unsigned long n"
24.Fa "unsigned char *md"
25.Fc
26.Ft int
27.Fo MD2_Init
28.Fa "MD2_CTX *c"
29.Fc
30.Ft int
31.Fo MD2_Update
32.Fa "MD2_CTX *c"
33.Fa "const unsigned char *data"
34.Fa "unsigned long len"
35.Fc
36.Ft int
37.Fo MD2_Final
38.Fa "unsigned char *md"
39.Fa "MD2_CTX *c"
40.Fc
41.In openssl/md4.h
42.Ft unsigned char *
43.Fo MD4
44.Fa "const unsigned char *d"
45.Fa "unsigned long n"
46.Fa "unsigned char *md"
47.Fc
48.Ft int
49.Fo MD4_Init
50.Fa "MD4_CTX *c"
51.Fc
52.Ft int
53.Fo MD4_Update
54.Fa "MD4_CTX *c"
55.Fa "const void *data"
56.Fa "unsigned long len"
57.Fc
58.Ft int
59.Fo MD4_Final
60.Fa "unsigned char *md"
61.Fa "MD4_CTX *c"
62.Fc
63.In openssl/md5.h
64.Ft unsigned char *
65.Fo MD5
66.Fa "const unsigned char *d"
67.Fa "unsigned long n"
68.Fa "unsigned char *md"
69.Fc
70.Ft int
71.Fo MD5_Init
72.Fa "MD5_CTX *c"
73.Fc
74.Ft int
75.Fo MD5_Update
76.Fa "MD5_CTX *c"
77.Fa "const void *data"
78.Fa "unsigned long len"
79.Fc
80.Ft int
81.Fo MD5_Final
82.Fa "unsigned char *md"
83.Fa "MD5_CTX *c"
84.Fc
85.Sh DESCRIPTION
86MD2, MD4, and MD5 are cryptographic hash functions with a 128 bit
87output.
88.Pp
89.Fn MD2 ,
90.Fn MD4 ,
91and
92.Fn MD5
93compute the MD2, MD4, and MD5 message digest of the
94.Fa n
95bytes at
96.Fa d
97and place it in
98.Fa md ,
99which must have space for
100.Dv MD2_DIGEST_LENGTH No ==
101.Dv MD4_DIGEST_LENGTH No ==
102.Dv MD5_DIGEST_LENGTH No == 16
103bytes of output.
104If
105.Fa md
106is
107.Dv NULL ,
108the digest is placed in a static array.
109.Pp
110The following functions may be used if the message is not completely
111stored in memory:
112.Pp
113.Fn MD2_Init
114initializes a
115.Vt MD2_CTX
116structure.
117.Pp
118.Fn MD2_Update
119can be called repeatedly with chunks of the message to be hashed
120.Pq Fa len No bytes at Fa data .
121.Pp
122.Fn MD2_Final
123places the message digest in
124.Fa md ,
125which must have space for
126.Dv MD2_DIGEST_LENGTH No == 16
127bytes of output, and erases the
128.Vt MD2_CTX .
129.Pp
130.Fn MD4_Init ,
131.Fn MD4_Update ,
132.Fn MD4_Final ,
133.Fn MD5_Init ,
134.Fn MD5_Update ,
135and
136.Fn MD5_Final
137are analogous using an
138.Vt MD4_CTX
139and
140.Vt MD5_CTX
141structure.
142.Pp
143Applications should use the higher level functions
144.Xr EVP_DigestInit 3
145etc. instead of calling these hash functions directly.
146.Sh RETURN VALUES
147.Fn MD2 ,
148.Fn MD4 ,
149and
150.Fn MD5
151return pointers to the hash value.
152.Pp
153.Fn MD2_Init ,
154.Fn MD2_Update ,
155.Fn MD2_Final ,
156.Fn MD4_Init ,
157.Fn MD4_Update ,
158.Fn MD4_Final ,
159.Fn MD5_Init ,
160.Fn MD5_Update ,
161and
162.Fn MD5_Final
163return 1 for success or 0 otherwise.
164.Sh SEE ALSO
165.Xr EVP_DigestInit 3
166.Sh STANDARDS
167RFC 1319, RFC 1320, RFC 1321
168.Sh HISTORY
169.Fn MD2 ,
170.Fn MD2_Init ,
171.Fn MD2_Update ,
172.Fn MD2_Final ,
173.Fn MD5 ,
174.Fn MD5_Init ,
175.Fn MD5_Update ,
176and
177.Fn MD5_Final
178are available in all versions of SSLeay and OpenSSL.
179.Pp
180.Fn MD4 ,
181.Fn MD4_Init ,
182and
183.Fn MD4_Update
184are available in OpenSSL 0.9.6 and above.