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