Source code of Windows XP (NT5)
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.

101 lines
3.1 KiB

  1. // MsRsaPriKB.h -- MicroSoft RSA Private Key Blob 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_MSRSAPRIKB_H)
  8. #define SLBCSP_MSRSAPRIKB_H
  9. #include <memory> // for auto_ptr
  10. #include <iopPriBlob.h>
  11. #include "MsRsaPubKB.h"
  12. class MsRsaPrivateKeyBlob
  13. : public MsRsaPublicKeyBlob
  14. {
  15. public:
  16. // Types
  17. typedef ElementValueType HeaderElementType;
  18. // C'tors/D'tors
  19. MsRsaPrivateKeyBlob(ALG_ID algid,
  20. Blob const &rbRawExponent,
  21. Blob const &rbRawModulus,
  22. Blob const &rbPrime1,
  23. Blob const &rbPrime2,
  24. Blob const &rbExponent1,
  25. Blob const &rbExponent2,
  26. Blob const &rbCoefficient,
  27. Blob const &rbPrivateExponent);
  28. MsRsaPrivateKeyBlob(BYTE const *pbData,
  29. DWORD dwDataLength);
  30. ~MsRsaPrivateKeyBlob();
  31. // Operators
  32. // Operations
  33. // Access
  34. ElementValueType const *
  35. Coefficient() const;
  36. size_t
  37. CoefficientLength() const;
  38. ElementValueType const *
  39. Exponent1() const;
  40. ElementValueType const *
  41. Exponent2() const;
  42. size_t
  43. ExponentLength() const;
  44. ElementValueType const *
  45. Prime1() const;
  46. ElementValueType const *
  47. Prime2() const;
  48. size_t
  49. PrimeLength() const;
  50. ElementValueType const *
  51. PrivateExponent() const;
  52. // Private exponent length
  53. size_t
  54. PriExpLength() const;
  55. // Predicates
  56. protected:
  57. // Types
  58. // C'tors/D'tors
  59. // Operators
  60. // Operations
  61. // Access
  62. // Predicates
  63. // Variables
  64. private:
  65. // Types
  66. // C'tors/D'tors
  67. // Operators
  68. // Operations
  69. // Access
  70. // Predicates
  71. // Variables
  72. };
  73. std::auto_ptr<iop::CPrivateKeyBlob>
  74. AsPCciPrivateKeyBlob(MsRsaPrivateKeyBlob const &rmsprivatekeyblob);
  75. #endif // SLBCSP_MSRSAPRIKB_H