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.

50 lines
1.4 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: drmutil.h
  4. //
  5. // Microsoft Digital Rights Management
  6. // Copyright (C) Microsoft Corporation, 1998 - 1999, All Rights Reserved
  7. //
  8. // Description:
  9. //
  10. //-----------------------------------------------------------------------------
  11. #ifndef __DRMUTIL_H__
  12. #define __DRMUTIL_H__
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif // _MSC_VER > 1000
  16. #include "strutil.h"
  17. #include "keygen.h"
  18. #include "license.h"
  19. #include "rc4.h"
  20. void rc4args( RC4_KEYSTRUCT *rc4ks, APPCERT *pAppCert1, APPCERT *pAppCert2, BYTE *pRights );
  21. void rc4args2( RC4_KEYSTRUCT *prc4ks, APPCERT *pAppCert1, APPCERT *pOutAppCert1,
  22. APPCERT *pAppCert2, APPCERT *pOutAppCert2,
  23. BYTE *pRights, BYTE *pOutRights);
  24. BYTE *FlipBits(BYTE *pbData, int iLen);
  25. #ifdef _M_IX86
  26. DWORD Byte2LittleEndian(BYTE *pb);
  27. #endif
  28. #ifdef _M_ALPHA
  29. DWORD Byte2BigEndian(BYTE *pb);
  30. BYTE *BigEndian2Byte(BYTE *pb, DWORD dwNum);
  31. #endif
  32. void LicDateToSysDate(BYTE *pbLicDate, SYSTEMTIME *pSysDate);
  33. void SysDateToLicDate(SYSTEMTIME *pSysDate, BYTE *pbLicDate);
  34. bool IsVersionOK(BYTE *pbVersion, BYTE *pbCurVersion);
  35. bool IsDateOK(BYTE *pbLicDate);
  36. HRESULT CheckCert(CERT *pCert, PUBKEY *ppk, bool fCheckCertDate);
  37. HRESULT CheckLicenseCertChain(CERTIFIED_LICENSE *pCertLicense, bool fCheckCertDate);
  38. DWORD GetDriveFormFactor(int iDrive);
  39. #endif