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.

185 lines
4.6 KiB

  1. // APubKey.h: interface for the CAbstractPublicKey class.
  2. //
  3. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  4. // 1999. This computer program includes Confidential, Proprietary
  5. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  6. // use, disclosure, and/or reproduction is prohibited unless authorized
  7. // in writing. All Rights Reserved.
  8. //////////////////////////////////////////////////////////////////////
  9. #if !defined(SLBCCI_APUBLICKEY_H)
  10. #define SLBCCI_APUBLICKEY_H
  11. // Note: This file should only be included by the CCI, not directly
  12. // by the client.
  13. #include <string>
  14. #include <slbRCObj.h>
  15. #include "ProtCrypt.h"
  16. namespace cci {
  17. class CAbstractPublicKey
  18. : public slbRefCnt::RCObject,
  19. public CProtectableCrypt
  20. {
  21. public:
  22. // Types
  23. // C'tors/D'tors
  24. virtual
  25. ~CAbstractPublicKey() throw() = 0;
  26. // Operators
  27. bool
  28. operator==(CAbstractPublicKey const &rhs) const;
  29. // TO DO: this should be superceded by implementing singletons
  30. bool
  31. operator!=(CAbstractPublicKey const &rhs) const;
  32. // TO DO: this should be superceded by implementing singletons
  33. // Operations
  34. virtual void
  35. CKInvisible(bool flag) = 0;
  36. virtual void
  37. CredentialID(std::string const &rstrID) = 0;
  38. virtual void
  39. Delete();
  40. virtual void
  41. Derive(bool flag) = 0;
  42. virtual void
  43. ID(std::string const &rstrID) = 0;
  44. virtual void
  45. EndDate(Date const &rdtEnd) = 0;
  46. virtual void
  47. Encrypt(bool flag) = 0;
  48. virtual void
  49. Exponent(std::string const &rstrExp) = 0;
  50. virtual void
  51. Label(std::string const &rstrLabel) = 0;
  52. virtual void
  53. Local(bool flag) = 0;
  54. virtual void
  55. Modifiable(bool flag) = 0;
  56. virtual void
  57. Modulus(std::string const &rstrModulus) = 0;
  58. virtual void
  59. StartDate(Date const &rdtStart) = 0;
  60. virtual void
  61. Subject(std::string const &rstrSubject) = 0;
  62. virtual void
  63. Verify(bool flag) = 0;
  64. virtual void
  65. VerifyRecover(bool flag) = 0;
  66. virtual void
  67. Wrap(bool flag) = 0;
  68. // Access
  69. virtual bool
  70. CKInvisible() = 0;
  71. virtual std::string
  72. CredentialID() = 0;
  73. virtual bool
  74. Derive() = 0;
  75. virtual bool
  76. Encrypt() = 0;
  77. virtual Date
  78. EndDate() = 0;
  79. virtual std::string
  80. Exponent() = 0;
  81. virtual std::string
  82. ID() = 0;
  83. virtual std::string
  84. Label() = 0;
  85. virtual bool
  86. Local() = 0;
  87. virtual bool
  88. Modifiable() = 0;
  89. virtual std::string
  90. Modulus() = 0;
  91. virtual bool
  92. Private() = 0;
  93. virtual Date
  94. StartDate() = 0;
  95. virtual std::string
  96. Subject() = 0;
  97. virtual bool
  98. Verify() = 0;
  99. virtual bool
  100. VerifyRecover() = 0;
  101. virtual bool
  102. Wrap() = 0;
  103. // Predicates
  104. protected:
  105. // Types
  106. // C'tors/D'tors
  107. CAbstractPublicKey(CAbstractCard const &racard,
  108. ObjectAccess oa);
  109. // Operators
  110. // Operations
  111. virtual void
  112. DoDelete() = 0;
  113. // Access
  114. // Predicates
  115. virtual bool
  116. DoEquals(CAbstractPublicKey const &rhs) const = 0;
  117. // TO DO: this should be superceded by implementing singletons
  118. // Variables
  119. private:
  120. // Types
  121. // C'tors/D'tors
  122. CAbstractPublicKey(CAbstractPublicKey const &rhs);
  123. // not defined, copying not allowed.
  124. // Operators
  125. CAbstractPublicKey &
  126. operator=(CAbstractPublicKey const &rhs);
  127. // not defined, initialization not allowed.
  128. // Operations
  129. // Access
  130. // Predicates
  131. // Variables
  132. };
  133. } // namespace cci
  134. #endif // SLBCCI_APUBLICKEY_H