2
0

mdc2.pod 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. unsigned char *MDC2(const unsigned char *d, unsigned long n,
  7. unsigned char *md);
  8. int MDC2_Init(MDC2_CTX *c);
  9. int MDC2_Update(MDC2_CTX *c, const unsigned char *data,
  10. unsigned long len);
  11. int MDC2_Final(unsigned char *md, MDC2_CTX *c);
  12. =head1 DESCRIPTION
  13. MDC2 is a method to construct hash functions with 128 bit output from
  14. block ciphers. These functions are an implementation of MDC2 with
  15. DES.
  16. MDC2() computes the MDC2 message digest of the B<n>
  17. bytes at B<d> and places it in B<md> (which must have space for
  18. MDC2_DIGEST_LENGTH == 16 bytes of output). If B<md> is NULL, the digest
  19. is placed in a static array.
  20. The following functions may be used if the message is not completely
  21. stored in memory:
  22. MDC2_Init() initializes a B<MDC2_CTX> structure.
  23. MDC2_Update() can be called repeatedly with chunks of the message to
  24. be hashed (B<len> bytes at B<data>).
  25. MDC2_Final() places the message digest in B<md>, which must have space
  26. for MDC2_DIGEST_LENGTH == 16 bytes of output, and erases the B<MDC2_CTX>.
  27. Applications should use the higher level functions
  28. L<EVP_DigestInit(3)|EVP_DigestInit(3)> etc. instead of calling the
  29. hash functions directly.
  30. =head1 RETURN VALUES
  31. MDC2() returns a pointer to the hash value.
  32. MDC2_Init(), MDC2_Update() and MDC2_Final() return 1 for success, 0 otherwise.
  33. =head1 CONFORMING TO
  34. ISO/IEC 10118-2, with DES
  35. =head1 SEE ALSO
  36. L<sha(3)|sha(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)>
  37. =head1 HISTORY
  38. MDC2(), MDC2_Init(), MDC2_Update() and MDC2_Final() are available since
  39. SSLeay 0.8.
  40. =cut