1MD5(3ossl)                          OpenSSL                         MD5(3ossl)
2
3
4

NAME

6       MD2, MD4, MD5, MD2_Init, MD2_Update, MD2_Final, MD4_Init, MD4_Update,
7       MD4_Final, MD5_Init, MD5_Update, MD5_Final - MD2, MD4, and MD5 hash
8       functions
9

SYNOPSIS

11        #include <openssl/md2.h>
12
13       The following functions have been deprecated since OpenSSL 3.0, and can
14       be hidden entirely by defining OPENSSL_API_COMPAT with a suitable
15       version value, see openssl_user_macros(7):
16
17        unsigned char *MD2(const unsigned char *d, unsigned long n, unsigned char *md);
18
19        int MD2_Init(MD2_CTX *c);
20        int MD2_Update(MD2_CTX *c, const unsigned char *data, unsigned long len);
21        int MD2_Final(unsigned char *md, MD2_CTX *c);
22
23
24        #include <openssl/md4.h>
25
26       The following functions have been deprecated since OpenSSL 3.0, and can
27       be hidden entirely by defining OPENSSL_API_COMPAT with a suitable
28       version value, see openssl_user_macros(7):
29
30        unsigned char *MD4(const unsigned char *d, unsigned long n, unsigned char *md);
31
32        int MD4_Init(MD4_CTX *c);
33        int MD4_Update(MD4_CTX *c, const void *data, unsigned long len);
34        int MD4_Final(unsigned char *md, MD4_CTX *c);
35
36
37        #include <openssl/md5.h>
38
39       The following functions have been deprecated since OpenSSL 3.0, and can
40       be hidden entirely by defining OPENSSL_API_COMPAT with a suitable
41       version value, see openssl_user_macros(7):
42
43        unsigned char *MD5(const unsigned char *d, unsigned long n, unsigned char *md);
44
45        int MD5_Init(MD5_CTX *c);
46        int MD5_Update(MD5_CTX *c, const void *data, unsigned long len);
47        int MD5_Final(unsigned char *md, MD5_CTX *c);
48

DESCRIPTION

50       All of the functions described on this page are deprecated.
51       Applications should instead use EVP_DigestInit_ex(3),
52       EVP_DigestUpdate(3) and EVP_DigestFinal_ex(3).
53
54       MD2, MD4, and MD5 are cryptographic hash functions with a 128 bit
55       output.
56
57       MD2(), MD4(), and MD5() compute the MD2, MD4, and MD5 message digest of
58       the n bytes at d and place it in md (which must have space for
59       MD2_DIGEST_LENGTH == MD4_DIGEST_LENGTH == MD5_DIGEST_LENGTH == 16 bytes
60       of output). If md is NULL, the digest is placed in a static array.
61
62       The following functions may be used if the message is not completely
63       stored in memory:
64
65       MD2_Init() initializes a MD2_CTX structure.
66
67       MD2_Update() can be called repeatedly with chunks of the message to be
68       hashed (len bytes at data).
69
70       MD2_Final() places the message digest in md, which must have space for
71       MD2_DIGEST_LENGTH == 16 bytes of output, and erases the MD2_CTX.
72
73       MD4_Init(), MD4_Update(), MD4_Final(), MD5_Init(), MD5_Update(), and
74       MD5_Final() are analogous using an MD4_CTX and MD5_CTX structure.
75
76       Applications should use the higher level functions EVP_DigestInit(3)
77       etc. instead of calling the hash functions directly.
78

NOTE

80       MD2, MD4, and MD5 are recommended only for compatibility with existing
81       applications. In new applications, hashes from the SHA-2 or SHA-3
82       family should be preferred.
83

RETURN VALUES

85       MD2(), MD4(), and MD5() return pointers to the hash value.
86
87       MD2_Init(), MD2_Update(), MD2_Final(), MD4_Init(), MD4_Update(),
88       MD4_Final(), MD5_Init(), MD5_Update(), and MD5_Final() return 1 for
89       success, 0 otherwise.
90

CONFORMING TO

92       RFC 1319, RFC 1320, RFC 1321
93

SEE ALSO

95       EVP_DigestInit(3), EVP_MD-SHA2(7), EVP_MD-SHA3(7)
96

HISTORY

98       All of these functions were deprecated in OpenSSL 3.0.
99
101       Copyright 2000-2023 The OpenSSL Project Authors. All Rights Reserved.
102
103       Licensed under the Apache License 2.0 (the "License").  You may not use
104       this file except in compliance with the License.  You can obtain a copy
105       in the file LICENSE in the source distribution or at
106       <https://www.openssl.org/source/license.html>.
107
108
109
1103.0.9                             2023-07-27                        MD5(3ossl)
Impressum