2
0

MD5.pod 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. =pod
  2. =head1 NAME
  3. MD2, MD4, MD5, MD2_Init, MD2_Update, MD2_Final, MD4_Init, MD4_Update,
  4. MD4_Final, MD5_Init, MD5_Update, MD5_Final - MD2, MD4, and MD5 hash functions
  5. =head1 SYNOPSIS
  6. #include <openssl/md2.h>
  7. Deprecated since OpenSSL 3.0, can be hidden entirely by defining
  8. B<OPENSSL_API_COMPAT> with a suitable version value, see
  9. L<openssl_user_macros(7)>:
  10. unsigned char *MD2(const unsigned char *d, unsigned long n, unsigned char *md);
  11. int MD2_Init(MD2_CTX *c);
  12. int MD2_Update(MD2_CTX *c, const unsigned char *data, unsigned long len);
  13. int MD2_Final(unsigned char *md, MD2_CTX *c);
  14. #include <openssl/md4.h>
  15. Deprecated since OpenSSL 3.0, can be hidden entirely by defining
  16. B<OPENSSL_API_COMPAT> with a suitable version value, see
  17. L<openssl_user_macros(7)>:
  18. unsigned char *MD4(const unsigned char *d, unsigned long n, unsigned char *md);
  19. int MD4_Init(MD4_CTX *c);
  20. int MD4_Update(MD4_CTX *c, const void *data, unsigned long len);
  21. int MD4_Final(unsigned char *md, MD4_CTX *c);
  22. #include <openssl/md5.h>
  23. Deprecated since OpenSSL 3.0, can be hidden entirely by defining
  24. B<OPENSSL_API_COMPAT> with a suitable version value, see
  25. L<openssl_user_macros(7)>:
  26. unsigned char *MD5(const unsigned char *d, unsigned long n, unsigned char *md);
  27. int MD5_Init(MD5_CTX *c);
  28. int MD5_Update(MD5_CTX *c, const void *data, unsigned long len);
  29. int MD5_Final(unsigned char *md, MD5_CTX *c);
  30. =head1 DESCRIPTION
  31. All of the functions described on this page are deprecated.
  32. Applications should instead use L<EVP_DigestInit_ex(3)>, L<EVP_DigestUpdate(3)>
  33. and L<EVP_DigestFinal_ex(3)>.
  34. MD2, MD4, and MD5 are cryptographic hash functions with a 128 bit output.
  35. MD2(), MD4(), and MD5() compute the MD2, MD4, and MD5 message digest
  36. of the B<n> bytes at B<d> and place it in B<md> (which must have space
  37. for MD2_DIGEST_LENGTH == MD4_DIGEST_LENGTH == MD5_DIGEST_LENGTH == 16
  38. bytes of output). If B<md> is NULL, the digest is placed in a static
  39. array.
  40. The following functions may be used if the message is not completely
  41. stored in memory:
  42. MD2_Init() initializes a B<MD2_CTX> structure.
  43. MD2_Update() can be called repeatedly with chunks of the message to
  44. be hashed (B<len> bytes at B<data>).
  45. MD2_Final() places the message digest in B<md>, which must have space
  46. for MD2_DIGEST_LENGTH == 16 bytes of output, and erases the B<MD2_CTX>.
  47. MD4_Init(), MD4_Update(), MD4_Final(), MD5_Init(), MD5_Update(), and
  48. MD5_Final() are analogous using an B<MD4_CTX> and B<MD5_CTX> structure.
  49. Applications should use the higher level functions
  50. L<EVP_DigestInit(3)>
  51. etc. instead of calling the hash functions directly.
  52. =head1 NOTE
  53. MD2, MD4, and MD5 are recommended only for compatibility with existing
  54. applications. In new applications, SHA-1 or RIPEMD-160 should be
  55. preferred.
  56. =head1 RETURN VALUES
  57. MD2(), MD4(), and MD5() return pointers to the hash value.
  58. MD2_Init(), MD2_Update(), MD2_Final(), MD4_Init(), MD4_Update(),
  59. MD4_Final(), MD5_Init(), MD5_Update(), and MD5_Final() return 1 for
  60. success, 0 otherwise.
  61. =head1 CONFORMING TO
  62. RFC 1319, RFC 1320, RFC 1321
  63. =head1 SEE ALSO
  64. L<EVP_DigestInit(3)>
  65. =head1 HISTORY
  66. All of these functions were deprecated in OpenSSL 3.0.
  67. =head1 COPYRIGHT
  68. Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
  69. Licensed under the Apache License 2.0 (the "License"). You may not use
  70. this file except in compliance with the License. You can obtain a copy
  71. in the file LICENSE in the source distribution or at
  72. L<https://www.openssl.org/source/license.html>.
  73. =cut