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.

48 lines
1.6 KiB

  1. /******************************************************************************
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. KeysLib.h
  5. Abstract:
  6. This file contains the declaration of the class used to sign and verify data.
  7. Revision History:
  8. Davide Massarenti (dmassare) 04/11/2000
  9. created
  10. ******************************************************************************/
  11. #if !defined(__INCLUDED___HCP___KEYSLIB_H___)
  12. #define __INCLUDED___HCP___KEYSLIB_H___
  13. /////////////////////////////////////////////////////////////////////////////
  14. class CPCHCryptKeys
  15. {
  16. HCRYPTPROV m_hCryptProv;
  17. HCRYPTKEY m_hKey;
  18. HCRYPTHASH m_hHash;
  19. HRESULT Close();
  20. HRESULT Init ();
  21. public:
  22. CPCHCryptKeys();
  23. ~CPCHCryptKeys();
  24. HRESULT CreatePair ( );
  25. HRESULT ExportPair ( /*[out]*/ CComBSTR& bstrPrivate, /*[out]*/ CComBSTR& bstrPublic );
  26. HRESULT ImportPrivate( /*[in] */ const CComBSTR& bstrPrivate );
  27. HRESULT ImportPublic ( /*[in ]*/ const CComBSTR& bstrPublic );
  28. HRESULT SignData ( /*[out]*/ CComBSTR& bstrSignature, /*[in]*/ BYTE* pbData, /*[in]*/ DWORD dwDataLen );
  29. HRESULT VerifyData( /*[in ]*/ const CComBSTR& bstrSignature, /*[in]*/ BYTE* pbData, /*[in]*/ DWORD dwDataLen );
  30. };
  31. /////////////////////////////////////////////////////////////////////////////
  32. #endif // !defined(__INCLUDED___HCP___KEYSLIB_H___)