1MD5(3)                              OpenSSL                             MD5(3)
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        unsigned char *MD2(const unsigned char *d, unsigned long n, unsigned char *md);
14
15        int MD2_Init(MD2_CTX *c);
16        int MD2_Update(MD2_CTX *c, const unsigned char *data, unsigned long len);
17        int MD2_Final(unsigned char *md, MD2_CTX *c);
18
19
20        #include <openssl/md4.h>
21
22        unsigned char *MD4(const unsigned char *d, unsigned long n, unsigned char *md);
23
24        int MD4_Init(MD4_CTX *c);
25        int MD4_Update(MD4_CTX *c, const void *data, unsigned long len);
26        int MD4_Final(unsigned char *md, MD4_CTX *c);
27
28
29        #include <openssl/md5.h>
30
31        unsigned char *MD5(const unsigned char *d, unsigned long n, unsigned char *md);
32
33        int MD5_Init(MD5_CTX *c);
34        int MD5_Update(MD5_CTX *c, const void *data, unsigned long len);
35        int MD5_Final(unsigned char *md, MD5_CTX *c);
36

DESCRIPTION

38       MD2, MD4, and MD5 are cryptographic hash functions with a 128 bit
39       output.
40
41       MD2(), MD4(), and MD5() compute the MD2, MD4, and MD5 message digest of
42       the n bytes at d and place it in md (which must have space for
43       MD2_DIGEST_LENGTH == MD4_DIGEST_LENGTH == MD5_DIGEST_LENGTH == 16 bytes
44       of output). If md is NULL, the digest is placed in a static array.
45
46       The following functions may be used if the message is not completely
47       stored in memory:
48
49       MD2_Init() initializes a MD2_CTX structure.
50
51       MD2_Update() can be called repeatedly with chunks of the message to be
52       hashed (len bytes at data).
53
54       MD2_Final() places the message digest in md, which must have space for
55       MD2_DIGEST_LENGTH == 16 bytes of output, and erases the MD2_CTX.
56
57       MD4_Init(), MD4_Update(), MD4_Final(), MD5_Init(), MD5_Update(), and
58       MD5_Final() are analogous using an MD4_CTX and MD5_CTX structure.
59
60       Applications should use the higher level functions EVP_DigestInit(3)
61       etc. instead of calling the hash functions directly.
62

NOTE

64       MD2, MD4, and MD5 are recommended only for compatibility with existing
65       applications. In new applications, SHA-1 or RIPEMD-160 should be
66       preferred.
67

RETURN VALUES

69       MD2(), MD4(), and MD5() return pointers to the hash value.
70
71       MD2_Init(), MD2_Update(), MD2_Final(), MD4_Init(), MD4_Update(),
72       MD4_Final(), MD5_Init(), MD5_Update(), and MD5_Final() return 1 for
73       success, 0 otherwise.
74

CONFORMING TO

76       RFC 1319, RFC 1320, RFC 1321
77

SEE ALSO

79       EVP_DigestInit(3)
80
82       Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
83
84       Licensed under the OpenSSL license (the "License").  You may not use
85       this file except in compliance with the License.  You can obtain a copy
86       in the file LICENSE in the source distribution or at
87       <https://www.openssl.org/source/license.html>.
88
89
90
911.1.1i                            2021-01-26                            MD5(3)
Impressum