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.

82 lines
2.5 KiB

  1. // AuxHash.h -- Auxillary Hash class declaration
  2. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  3. // 1999. 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. #if !defined(SLBCSP_AUXHASH_H)
  8. #define SLBCSP_AUXHASH_H
  9. #include <wincrypt.h>
  10. #include "Blob.h"
  11. #include "AuxContext.h"
  12. // Base class for all hash classes using a CSP (Auxillary provider)
  13. class AuxHash
  14. {
  15. public:
  16. // Types
  17. // C'tors/D'tors
  18. AuxHash(AuxContext &rauxcontext, // Context to use
  19. ALG_ID ai, // Hashing algorithm
  20. HCRYPTKEY hKey = 0); // Encryption key
  21. virtual
  22. ~AuxHash();
  23. // Operators
  24. // Operations
  25. void
  26. Import(Blob const &rblob);
  27. void
  28. Update(Blob const &rblob);
  29. // Access
  30. ALG_ID
  31. AlgId() const;
  32. DWORD
  33. Size() const;
  34. Blob
  35. Value() const;
  36. Blob
  37. Value(Blob const &rblob);
  38. // Predicates
  39. protected:
  40. // Types
  41. // C'tors/D'tors
  42. // Operators
  43. // Operations
  44. // Access
  45. // Predicates
  46. // Variables
  47. private:
  48. // Types
  49. // C'tors/D'tors
  50. AuxHash(AuxHash const &rhs); // do not define
  51. // Operators
  52. AuxHash &
  53. operator=(AuxHash const &rhs); // do not define
  54. // Operations
  55. // Access
  56. // Predicates
  57. // Variables
  58. HCRYPTHASH m_hHash;
  59. };
  60. #endif // SLBCSP_AUXHASH_H