Blame doc/man3/MD5.pod

Packit c4476c
=pod
Packit c4476c
Packit c4476c
=head1 NAME
Packit c4476c
Packit c4476c
MD2, MD4, MD5, MD2_Init, MD2_Update, MD2_Final, MD4_Init, MD4_Update,
Packit c4476c
MD4_Final, MD5_Init, MD5_Update, MD5_Final - MD2, MD4, and MD5 hash functions
Packit c4476c
Packit c4476c
=head1 SYNOPSIS
Packit c4476c
Packit c4476c
 #include <openssl/md2.h>
Packit c4476c
Packit c4476c
 unsigned char *MD2(const unsigned char *d, unsigned long n, unsigned char *md);
Packit c4476c
Packit c4476c
 int MD2_Init(MD2_CTX *c);
Packit c4476c
 int MD2_Update(MD2_CTX *c, const unsigned char *data, unsigned long len);
Packit c4476c
 int MD2_Final(unsigned char *md, MD2_CTX *c);
Packit c4476c
Packit c4476c
Packit c4476c
 #include <openssl/md4.h>
Packit c4476c
Packit c4476c
 unsigned char *MD4(const unsigned char *d, unsigned long n, unsigned char *md);
Packit c4476c
Packit c4476c
 int MD4_Init(MD4_CTX *c);
Packit c4476c
 int MD4_Update(MD4_CTX *c, const void *data, unsigned long len);
Packit c4476c
 int MD4_Final(unsigned char *md, MD4_CTX *c);
Packit c4476c
Packit c4476c
Packit c4476c
 #include <openssl/md5.h>
Packit c4476c
Packit c4476c
 unsigned char *MD5(const unsigned char *d, unsigned long n, unsigned char *md);
Packit c4476c
Packit c4476c
 int MD5_Init(MD5_CTX *c);
Packit c4476c
 int MD5_Update(MD5_CTX *c, const void *data, unsigned long len);
Packit c4476c
 int MD5_Final(unsigned char *md, MD5_CTX *c);
Packit c4476c
Packit c4476c
=head1 DESCRIPTION
Packit c4476c
Packit c4476c
MD2, MD4, and MD5 are cryptographic hash functions with a 128 bit output.
Packit c4476c
Packit c4476c
MD2(), MD4(), and MD5() compute the MD2, MD4, and MD5 message digest
Packit c4476c
of the B<n> bytes at B<d> and place it in B<md> (which must have space
Packit c4476c
for MD2_DIGEST_LENGTH == MD4_DIGEST_LENGTH == MD5_DIGEST_LENGTH == 16
Packit c4476c
bytes of output). If B<md> is NULL, the digest is placed in a static
Packit c4476c
array.
Packit c4476c
Packit c4476c
The following functions may be used if the message is not completely
Packit c4476c
stored in memory:
Packit c4476c
Packit c4476c
MD2_Init() initializes a B<MD2_CTX> structure.
Packit c4476c
Packit c4476c
MD2_Update() can be called repeatedly with chunks of the message to
Packit c4476c
be hashed (B<len> bytes at B<data>).
Packit c4476c
Packit c4476c
MD2_Final() places the message digest in B<md>, which must have space
Packit c4476c
for MD2_DIGEST_LENGTH == 16 bytes of output, and erases the B<MD2_CTX>.
Packit c4476c
Packit c4476c
MD4_Init(), MD4_Update(), MD4_Final(), MD5_Init(), MD5_Update(), and
Packit c4476c
MD5_Final() are analogous using an B<MD4_CTX> and B<MD5_CTX> structure.
Packit c4476c
Packit c4476c
Applications should use the higher level functions
Packit c4476c
L<EVP_DigestInit(3)>
Packit c4476c
etc. instead of calling the hash functions directly.
Packit c4476c
Packit c4476c
=head1 NOTE
Packit c4476c
Packit c4476c
MD2, MD4, and MD5 are recommended only for compatibility with existing
Packit c4476c
applications. In new applications, SHA-1 or RIPEMD-160 should be
Packit c4476c
preferred.
Packit c4476c
Packit c4476c
=head1 RETURN VALUES
Packit c4476c
Packit c4476c
MD2(), MD4(), and MD5() return pointers to the hash value.
Packit c4476c
Packit c4476c
MD2_Init(), MD2_Update(), MD2_Final(), MD4_Init(), MD4_Update(),
Packit c4476c
MD4_Final(), MD5_Init(), MD5_Update(), and MD5_Final() return 1 for
Packit c4476c
success, 0 otherwise.
Packit c4476c
Packit c4476c
=head1 CONFORMING TO
Packit c4476c
Packit c4476c
RFC 1319, RFC 1320, RFC 1321
Packit c4476c
Packit c4476c
=head1 SEE ALSO
Packit c4476c
Packit c4476c
L<EVP_DigestInit(3)>
Packit c4476c
Packit c4476c
=head1 COPYRIGHT
Packit c4476c
Packit c4476c
Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
Packit c4476c
Packit c4476c
Licensed under the OpenSSL license (the "License").  You may not use
Packit c4476c
this file except in compliance with the License.  You can obtain a copy
Packit c4476c
in the file LICENSE in the source distribution or at
Packit c4476c
L<https://www.openssl.org/source/license.html>.
Packit c4476c
Packit c4476c
=cut