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.

68 lines
2.4 KiB

  1. /********************************************************************
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. Encrypt.h
  5. Abstract:
  6. Declaration of the CSAFEncrypt class.
  7. Revision History:
  8. KalyaniN created 06/28/'00
  9. ********************************************************************/
  10. // ATL did not generate so i did
  11. #if !defined(AFX_ENCRYPT_H__84BD2128_7B5D_483F_9C80_35B974A003C5__INCLUDED_)
  12. #define AFX_ENCRYPT_H__84BD2128_7B5D_483F_9C80_35B974A003C5__INCLUDED_
  13. #include "msscript.h"
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CSAFEncrypt
  16. class CSAFEncrypt :
  17. public CComObjectRootEx<MPC::CComSafeMultiThreadModel>,
  18. public IDispatchImpl<ISAFEncrypt, &IID_ISAFEncrypt, &LIBID_HelpServiceTypeLib>
  19. {
  20. private:
  21. long m_EncryptionType;
  22. void Cleanup(void);
  23. public:
  24. CSAFEncrypt();
  25. ~CSAFEncrypt();
  26. BEGIN_COM_MAP(CSAFEncrypt)
  27. COM_INTERFACE_ENTRY(ISAFEncrypt)
  28. COM_INTERFACE_ENTRY(IDispatch)
  29. END_COM_MAP()
  30. DECLARE_NO_REGISTRY()
  31. DECLARE_NOT_AGGREGATABLE(CSAFEncrypt)
  32. // ISAFEncrypt
  33. public:
  34. STDMETHOD(put_EncryptionType )( /*[in]*/ long Val );
  35. STDMETHOD(get_EncryptionType )( /*[out, retval]*/ long *pVal );
  36. STDMETHOD(EncryptString )( /*[in]*/ BSTR bstrEncryptionkey, /*[in]*/ BSTR bstrInputString, /*[out, retval]*/ BSTR *bstrEncryptedString );
  37. STDMETHOD(DecryptString )( /*[in]*/ BSTR bstrEncryptionkey, /*[in]*/ BSTR bstrInputString, /*[out, retval]*/ BSTR *bstrDecryptedString );
  38. STDMETHOD(EncryptFile )( /*[in]*/ BSTR bstrEncryptionKey, /*[in]*/ BSTR bstrInputFile, /*[in]*/ BSTR bstrEncryptedFile );
  39. STDMETHOD(DecryptFile )( /*[in]*/ BSTR bstrEncryptionKey, /*[in]*/ BSTR bstrInputFile, /*[in]*/ BSTR bstrDecryptedFile );
  40. STDMETHOD(EncryptStream )( /*[in]*/ BSTR bstrEncryptionKey, /*[in]*/ IUnknown *punkInStm, /*[out, retval]*/ IUnknown **ppunkOutStm );
  41. STDMETHOD(DecryptStream )( /*[in]*/ BSTR bstrEncryptionKey, /*[in]*/ IUnknown *punkInStm, /*[out, retval]*/ IUnknown **ppunkOutStm );
  42. };
  43. #endif //__SAFENCRYPT_H_