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
10 #include <openssl/md2.h>
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)>:
16 unsigned char *MD2(const unsigned char *d, unsigned long n, unsigned char *md);
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);
23 #include <openssl/md4.h>
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)>:
29 unsigned char *MD4(const unsigned char *d, unsigned long n, unsigned char *md);
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);
36 #include <openssl/md5.h>
38 unsigned char *MD5(const unsigned char *d, unsigned long n, unsigned char *md);
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);
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)>.
50 MD2, MD4, and MD5 are cryptographic hash functions with a 128 bit output.
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
58 The following functions may be used if the message is not completely
61 MD2_Init() initializes a B<MD2_CTX> structure.
63 MD2_Update() can be called repeatedly with chunks of the message to
64 be hashed (B<len> bytes at B<data>).
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>.
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.
72 Applications should use the higher level functions
74 etc. instead of calling the hash functions directly.
78 MD2, MD4, and MD5 are recommended only for compatibility with existing
79 applications. In new applications, SHA-1 or RIPEMD-160 should be
84 MD2(), MD4(), and MD5() return pointers to the hash value.
86 MD2_Init(), MD2_Update(), MD2_Final(), MD4_Init(), MD4_Update(),
87 MD4_Final(), MD5_Init(), MD5_Update(), and MD5_Final() return 1 for
92 RFC 1319, RFC 1320, RFC 1321
100 All of these functions were deprecated in OpenSSL 3.0.
104 Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
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>.