MDC2_Init.pod 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. =pod
  2. =head1 NAME
  3. MDC2, MDC2_Init, MDC2_Update, MDC2_Final - MDC2 hash function
  4. =head1 SYNOPSIS
  5. #include <openssl/mdc2.h>
  6. Deprecated since OpenSSL 3.0, can be hidden entirely by defining
  7. B<OPENSSL_API_COMPAT> with a suitable version value, see
  8. L<openssl_user_macros(7)>:
  9. unsigned char *MDC2(const unsigned char *d, unsigned long n,
  10. unsigned char *md);
  11. int MDC2_Init(MDC2_CTX *c);
  12. int MDC2_Update(MDC2_CTX *c, const unsigned char *data,
  13. unsigned long len);
  14. int MDC2_Final(unsigned char *md, MDC2_CTX *c);
  15. =head1 DESCRIPTION
  16. All of the functions described on this page are deprecated.
  17. Applications should instead use L<EVP_DigestInit_ex(3)>, L<EVP_DigestUpdate(3)>
  18. and L<EVP_DigestFinal_ex(3)>.
  19. MDC2 is a method to construct hash functions with 128 bit output from
  20. block ciphers. These functions are an implementation of MDC2 with
  21. DES.
  22. MDC2() computes the MDC2 message digest of the B<n>
  23. bytes at B<d> and places it in B<md> (which must have space for
  24. MDC2_DIGEST_LENGTH == 16 bytes of output). If B<md> is NULL, the digest
  25. is placed in a static array.
  26. The following functions may be used if the message is not completely
  27. stored in memory:
  28. MDC2_Init() initializes a B<MDC2_CTX> structure.
  29. MDC2_Update() can be called repeatedly with chunks of the message to
  30. be hashed (B<len> bytes at B<data>).
  31. MDC2_Final() places the message digest in B<md>, which must have space
  32. for MDC2_DIGEST_LENGTH == 16 bytes of output, and erases the B<MDC2_CTX>.
  33. Applications should use the higher level functions
  34. L<EVP_DigestInit(3)> etc. instead of calling the
  35. hash functions directly.
  36. =head1 RETURN VALUES
  37. MDC2() returns a pointer to the hash value.
  38. MDC2_Init(), MDC2_Update() and MDC2_Final() return 1 for success, 0 otherwise.
  39. =head1 CONFORMING TO
  40. ISO/IEC 10118-2:2000 Hash-Function 2, with DES as the underlying block cipher.
  41. =head1 SEE ALSO
  42. L<EVP_DigestInit(3)>
  43. =head1 HISTORY
  44. All of these functions were deprecated in OpenSSL 3.0.
  45. =head1 COPYRIGHT
  46. Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
  47. Licensed under the Apache License 2.0 (the "License"). You may not use
  48. this file except in compliance with the License. You can obtain a copy
  49. in the file LICENSE in the source distribution or at
  50. L<https://www.openssl.org/source/license.html>.
  51. =cut