Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.8 KiB

  1. // HashSHAMD5.cpp -- definition of CHashSHAMD5
  2. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  3. // 1998. This computer program includes Confidential, Proprietary
  4. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  5. // use, disclosure, and/or reproduction is prohibited unless authorized
  6. // in writing. All Rights Reserved.
  7. #include "stdafx.h" // because handles.h uses the ASSERT macro
  8. #include <memory> // for auto_ptr
  9. #include "HashSHAMD5.h"
  10. using namespace std;
  11. /////////////////////////// LOCAL/HELPER /////////////////////////////////
  12. /////////////////////////// PUBLIC /////////////////////////////////
  13. // Types
  14. // C'tors/D'tors
  15. CHashSHAMD5::CHashSHAMD5(CryptContext const &rcryptctx)
  16. : CHashContext(rcryptctx, CALG_SSL3_SHAMD5)
  17. {}
  18. CHashSHAMD5::~CHashSHAMD5() throw()
  19. {}
  20. // Operators
  21. // Operations
  22. auto_ptr<CHashContext>
  23. CHashSHAMD5::Clone(DWORD const *pdwReserved,
  24. DWORD dwFlags) const
  25. {
  26. return auto_ptr<CHashContext>(new CHashSHAMD5(*this, pdwReserved,
  27. dwFlags));
  28. }
  29. // Access
  30. // Predicates
  31. // Static Variables
  32. /////////////////////////// PROTECTED /////////////////////////////////
  33. // C'tors/D'tors
  34. // Duplicate the hash and its state
  35. CHashSHAMD5::CHashSHAMD5(CHashSHAMD5 const &rhs,
  36. DWORD const *pdwReserved,
  37. DWORD dwFlags)
  38. : CHashContext(rhs, pdwReserved, dwFlags)
  39. {}
  40. // Operators
  41. // Operations
  42. // Access
  43. Blob
  44. CHashSHAMD5::EncodedAlgorithmOid()
  45. {
  46. return Blob(); // No OID for this hash
  47. }
  48. // Predicates
  49. // Static Variables
  50. /////////////////////////// PRIVATE /////////////////////////////////
  51. // C'tors/D'tors
  52. // Operators
  53. // Operations
  54. // Access
  55. // Predicates
  56. // Static Variables