资源简介
用vc++6.0实现des的加密和解密功能

代码片段和文件信息
#include
#include “yxyDES.h“
void main()
{
yxyDES* my_des = new yxyDES();
string test_string = “test des plaintext!“;
printf(“firstwe use the des:\n“);
//initialize key
my_des->InitializeKey(“12345678“false);
printf(“key is : 12345678 \n“);
//use des to encrypt
my_des->EncryptAnyLength(test_stringfalse);
printf(“set plaintext : %s \n“test_string.c_str());
//get the ciphertext
test_string = my_des->GetCiphertextAnyLength();
printf(“after encrypt : %s \n“test_string.c_str());
//use des to decrypt
printf(“nowdecrypting...\n“);
my_des->DecryptAnyLength(test_stringfalse);
test_string = my_des->GetPlaintextAnyLength();
printf(“after decrypt : %s \n“test_string.c_str());
//use 3des
printf(“\n\nnowlet us use the 3des:\n“);
printf(“before encrypttest_string is : %s\n“test_string.c_str());
//initialize the first key
my_des->InitializeKey(“12345678“false);
printf(“the first key is : 12345678 \n“);
//initialize the second key
my_des->InitializeKey(“87654321“true);
printf(“the second key is : 87654321 \n“);
//use 3des to encrypt
my_des->TripleEncryptAnyLength(test_string);
//get the ciphertext
test_string = my_des->GetCiphertextAnyLength();
printf(“after encrypt : %s \n“test_string.c_str());
//use the 3des to decrypt
printf(“now(3des)decrypting...\n“);
my_des->TripleDecryptAnyLength(test_string);
test_string = my_des->GetPlaintextAnyLength();
printf(“after (3des)decrypt : %s \n“test_string.c_str());
getchar();
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1531 2007-06-13 01:20 vc_3des\test_main.cpp
文件 4420 2007-06-13 00:54 vc_3des\vc_3des.dsp
文件 537 2007-06-13 00:21 vc_3des\vc_3des.dsw
文件 7302144 2007-12-29 12:00 vc_3des\vc_3des.ncb
文件 49664 2007-06-13 01:23 vc_3des\vc_3des.opt
文件 1469 2007-06-13 01:20 vc_3des\vc_3des.plg
文件 878 2007-12-29 12:00 vc_3des\vc_3des.sln
..A..H. 8192 2007-12-29 12:00 vc_3des\vc_3des.suo
文件 5631 2007-12-29 12:00 vc_3des\vc_3des.vcproj
文件 1427 2007-12-29 12:00 vc_3des\vc_3des.vcproj.A31CF74D38B24B5.Administrator.user
文件 28061 2007-06-13 00:54 vc_3des\yxyDES.cpp
文件 11339 2007-06-13 00:54 vc_3des\yxyDES.h
目录 0 2007-06-13 01:24 vc_3des\Debug
目录 0 2007-12-29 12:00 vc_3des
----------- --------- ---------- ----- ----
7415293 14
相关资源
- VC++ 多线程文件读写操作
- 移木块游戏,可以自编自玩,vc6.0编写
- 3des加密算法C语言实现
- DES加密算法C语言实现
- VC++MFC小游戏实例教程(实例)+MFC类库
- C语言实现的DES对称加密算法
- VC++实现CMD命令执行与获得返回信息
- VC++基于OpenGL模拟的一个3维空间模型
- 基于VC++的SolidWorks二次开发SolidWorks
- 派克变换VC++源码(附文档)
- VC++ 串口
- VC++ 大富翁4_大富翁游戏源码
- VC++ 摄像头视频采集与回放源程序
- 转 VC++ 实现电子邮件(Email)发送
- 基于空调项目的Autosar 架构的设计.d
- 基于MFC的VC++仿QQ浏览器源码(雏形)
- VC++ 服务程序编写及安装与卸载
- VC++6.0番茄西红柿VAXvirsual assist X完美破
- 基于改进的fcm算法的图像分割vc++
- VC++6.0 绿色版,免安装,非常好用。
- Microsoft Visual C++ 2005 Redistributable Pack
- VC++MFC课程设计的学生成绩管理系统
- 大智慧365DLL插件设计
- VC++6.0汉化包
- VC++完整商业界面源码(再上传)
- VC++编程技术600个大型项目源码.rar
- VC++实现RSA加密算法
- VC++ 中国象棋经典游戏源代码
- 郁金香VC++游戏辅助视频教程
- C语言进阶源码---基于graphics实现图书
评论
共有 条评论