#include "stdafx.h" #include "QuickCryptor.h" #include <string.h> #include <iostream> using namespace std; /************************************************************** 技术博客 http://www.cnblogs.com/itdef/ 技术交流群 群号码:324164944 欢迎c c++ windows驱动爱好者 服务器程序员沟通交流 **************************************************************/ int main() { char buf[24] = "0123456789 this is a test"; int len = strlen(buf); char* key = "DEFTest"; cout << buf << endl; CQuickCryptor qc; qc.Init(key); qc.Encrypt(buf,len); cout << buf << endl; qc.Decrypt(buf,len); cout << buf << endl; return 0; }
详情见
http://www.oschina.net/code/snippet_614253_56627