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.

61 lines
1.7 KiB

  1. // iopPriBlob.h: interface for the CPrivateKeyBlob
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(IOP_PRIBLOB_H)
  5. #define IOP_PRIBLOB_H
  6. #include <windows.h>
  7. #include <scuSecureArray.h>
  8. #include "DllSymDefn.h"
  9. namespace iop
  10. {
  11. // Instantiate the templates so they will be properly accessible
  12. // as data members to the exported class CSmartCard in the DLL. See
  13. // MSDN Knowledge Base Article Q168958 for more information.
  14. #pragma warning(push)
  15. // Non-standard extension used: 'extern' before template explicit
  16. // instantiation
  17. #pragma warning(disable : 4231)
  18. IOPDLL_EXPIMP_TEMPLATE template class IOPDLL_API scu::SecureArray<BYTE>;
  19. IOPDLL_EXPIMP_TEMPLATE template class IOPDLL_API scu::SecureArray<char>;
  20. #pragma warning(pop)
  21. class IOPDLL_API CPrivateKeyBlob
  22. {
  23. public:
  24. CPrivateKeyBlob()
  25. : bP(scu::SecureArray<BYTE>(64)),
  26. bQ(scu::SecureArray<BYTE>(64)),
  27. bInvQ(scu::SecureArray<BYTE>(64)),
  28. bKsecModQ(scu::SecureArray<BYTE>(64)),
  29. bKsecModP(scu::SecureArray<BYTE>(64))
  30. {
  31. };
  32. virtual ~CPrivateKeyBlob(){};
  33. BYTE bPLen;
  34. BYTE bQLen;
  35. BYTE bInvQLen;
  36. BYTE bKsecModQLen;
  37. BYTE bKsecModPLen;
  38. scu::SecureArray<BYTE> bP;
  39. scu::SecureArray<BYTE> bQ;
  40. scu::SecureArray<BYTE>bInvQ;
  41. scu::SecureArray<BYTE> bKsecModQ;
  42. scu::SecureArray<BYTE> bKsecModP;
  43. };
  44. /////////////////////////// HELPERS /////////////////////////////////
  45. void IOPDLL_API __cdecl // __cdecl req'd by CCI
  46. Clear(CPrivateKeyBlob &rKeyBlob); // defined in KeyBlobHlp.cpp
  47. } // namespace iop
  48. #endif // IOP_PRIBLOB_H