⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 toolskit.cpp

📁 COM 组建的开发
💻 CPP
字号:
// ToolsKit.cpp: implementation of the CToolsKit class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "resource.h"
#include "ToolsKit.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CToolsKit::CToolsKit()
{

}

CToolsKit::~CToolsKit()
{

}

CString CToolsKit::GetHostCode()
{
	HW_PROFILE_INFO   HwProfInfo;
   if (!GetCurrentHwProfile(&HwProfInfo)) 
   {
      return "";
   }
	CString strRe = "";
	strRe.Format("%s",HwProfInfo.szHwProfileGuid);
	strRe.Replace("{","");
	strRe.Replace("}","");
	strRe.Replace("-","");
	return strRe;
}
// des加密 [5/8/2008 By willing]
BOOL CToolsKit::Encrypt(char *Out,char *In,long datalen,const char *Key,int keylen)
{
	if (Des_Go(Out,In,datalen,Key,keylen,false) == true)
	{
		return TRUE;
	}else{
		return FALSE;
	}
	return TRUE;
}
// MD5加密 [5/31/2007 by willing]
CString CToolsKit::GetMD5(BYTE *ptrBuffer,int nBufferLen)
{
	CString strResult = "";
	if (ptrBuffer == NULL)
	{
		return "";
	}
	CMD5Checksum MD5Checksum;
	strResult  =MD5Checksum.GetMD5(ptrBuffer,nBufferLen);
	return strResult;
}
// MD5加密 [5/31/2007 by willing]
CString CToolsKit::GetMD5_Str(CString str)
{
	CString strResult = "";
	CMD5Checksum MD5Checksum;
	strResult  =MD5Checksum.GetMD5(str);
	return strResult;
}
// 3DES解密 [5/28/2008 By willing]
BOOL CToolsKit::Recove(char *Out,char *In,long datalen,const char *Key,int keylen)
{
	if (Des_Go(Out,In,datalen,Key,keylen,true) == true)
	{
		return TRUE;
	}else{
		return FALSE;
	}
	return TRUE;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -