Deprecate the low level MD4 functions.
[openssl.git] / doc / man3 / MD5.pod
1 =pod
2
3 =head1 NAME
4
5 MD2, MD4, MD5, MD2_Init, MD2_Update, MD2_Final, MD4_Init, MD4_Update,
6 MD4_Final, MD5_Init, MD5_Update, MD5_Final - MD2, MD4, and MD5 hash functions
7
8 =head1 SYNOPSIS
9
10  #include <openssl/md2.h>
11
12 Deprecated since OpenSSL 3.0, can be hidden entirely by defining
13 B<OPENSSL_API_COMPAT> with a suitable version value, see
14 L<openssl_user_macros(7)>:
15
16  unsigned char *MD2(const unsigned char *d, unsigned long n, unsigned char *md);
17
18  int MD2_Init(MD2_CTX *c);
19  int MD2_Update(MD2_CTX *c, const unsigned char *data, unsigned long len);
20  int MD2_Final(unsigned char *md, MD2_CTX *c);
21
22
23  #include <openssl/md4.h>
24
25 Deprecated since OpenSSL 3.0, can be hidden entirely by defining
26 B<OPENSSL_API_COMPAT> with a suitable version value, see
27 L<openssl_user_macros(7)>:
28
29  unsigned char *MD4(const unsigned char *d, unsigned long n, unsigned char *md);
30
31  int MD4_Init(MD4_CTX *c);
32  int MD4_Update(MD4_CTX *c, const void *data, unsigned long len);
33  int MD4_Final(unsigned char *md, MD4_CTX *c);
34
35
36  #include <openssl/md5.h>
37
38  unsigned char *MD5(const unsigned char *d, unsigned long n, unsigned char *md);
39
40  int MD5_Init(MD5_CTX *c);
41  int MD5_Update(MD5_CTX *c, const void *data, unsigned long len);
42  int MD5_Final(unsigned char *md, MD5_CTX *c);
43
44 =head1 DESCRIPTION
45
46 All of the functions described on this page are deprecated.
47 Applications should instead use L<EVP_DigestInit_ex(3)>, L<EVP_DigestUpdate(3)>
48 and L<EVP_DigestFinal_ex(3)>.
49
50 MD2, MD4, and MD5 are cryptographic hash functions with a 128 bit output.
51
52 MD2(), MD4(), and MD5() compute the MD2, MD4, and MD5 message digest
53 of the B<n> bytes at B<d> and place it in B<md> (which must have space
54 for MD2_DIGEST_LENGTH == MD4_DIGEST_LENGTH == MD5_DIGEST_LENGTH == 16
55 bytes of output). If B<md> is NULL, the digest is placed in a static
56 array.
57
58 The following functions may be used if the message is not completely
59 stored in memory:
60
61 MD2_Init() initializes a B<MD2_CTX> structure.
62
63 MD2_Update() can be called repeatedly with chunks of the message to
64 be hashed (B<len> bytes at B<data>).
65
66 MD2_Final() places the message digest in B<md>, which must have space
67 for MD2_DIGEST_LENGTH == 16 bytes of output, and erases the B<MD2_CTX>.
68
69 MD4_Init(), MD4_Update(), MD4_Final(), MD5_Init(), MD5_Update(), and
70 MD5_Final() are analogous using an B<MD4_CTX> and B<MD5_CTX> structure.
71
72 Applications should use the higher level functions
73 L<EVP_DigestInit(3)>
74 etc. instead of calling the hash functions directly.
75
76 =head1 NOTE
77
78 MD2, MD4, and MD5 are recommended only for compatibility with existing
79 applications. In new applications, SHA-1 or RIPEMD-160 should be
80 preferred.
81
82 =head1 RETURN VALUES
83
84 MD2(), MD4(), and MD5() return pointers to the hash value.
85
86 MD2_Init(), MD2_Update(), MD2_Final(), MD4_Init(), MD4_Update(),
87 MD4_Final(), MD5_Init(), MD5_Update(), and MD5_Final() return 1 for
88 success, 0 otherwise.
89
90 =head1 CONFORMING TO
91
92 RFC 1319, RFC 1320, RFC 1321
93
94 =head1 SEE ALSO
95
96 L<EVP_DigestInit(3)>
97
98 =head1 HISTORY
99
100 All of these functions were deprecated in OpenSSL 3.0.
101
102 =head1 COPYRIGHT
103
104 Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
105
106 Licensed under the Apache License 2.0 (the "License").  You may not use
107 this file except in compliance with the License.  You can obtain a copy
108 in the file LICENSE in the source distribution or at
109 L<https://www.openssl.org/source/license.html>.
110
111 =cut