资源简介
该源码具有以下功能:
1.具有AES算法(高级加密标准)的实现类源码
2.在我的源码中使用AES对象进行文件加密和解密

代码片段和文件信息
// AES.cpp: implementation of the AES class.
//
//////////////////////////////////////////////////////////////////////
#include “stdafx.h“
#include “FileEncrypt.h“
#include “AES.h“
#include “string.h“
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
AES::AES(unsigned char* key)
{
unsigned char sBox[] =
{ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
0x630x7c0x770x7b0xf20x6b0x6f0xc50x300x010x670x2b0xfe0xd70xab0x76 /*0*/
0xca0x820xc90x7d0xfa0x590x470xf00xad0xd40xa20xaf0x9c0xa40x720xc0 /*1*/
0xb70xfd0x930x260x360x3f0xf70xcc0x340xa50xe50xf10x710xd80x310x15 /*2*/
0x040xc70x230xc30x180x960x050x9a0x070x120x800xe20xeb0x270xb20x75 /*3*/
0x090x830x2c0x1a0x1b0x6e0x5a0xa00x520x3b0xd60xb30x290xe30x2f0x84 /*4*/
0x530xd10x000xed0x200xfc0xb10x5b0x6a0xcb0xbe0x390x4a0x4c0x580xcf /*5*/
0xd00xef0xaa0xfb0x430x4d0x330x850x450xf90x020x7f0x500x3c0x9f0xa8 /*6*/
0x510xa30x400x8f0x920x9d0x380xf50xbc0xb60xda0x210x100xff0xf30xd2 /*7*/
0xcd0x0c0x130xec0x5f0x970x440x170xc40xa70x7e0x3d0x640x5d0x190x73 /*8*/
0x600x810x4f0xdc0x220x2a0x900x880x460xee0xb80x140xde0x5e0x0b0xdb /*9*/
0xe00x320x3a0x0a0x490x060x240x5c0xc20xd30xac0x620x910x950xe40x79 /*a*/
0xe70xc80x370x6d0x8d0xd50x4e0xa90x6c0x560xf40xea0x650x7a0xae0x08 /*b*/
0xba0x780x250x2e0x1c0xa60xb40xc60xe80xdd0x740x1f0x4b0xbd0x8b0x8a /*c*/
0x700x3e0xb50x660x480x030xf60x0e0x610x350x570xb90x860xc10x1d0x9e /*d*/
0xe10xf80x980x110x690xd90x8e0x940x9b0x1e0x870xe90xce0x550x280xdf /*e*/
0x8c0xa10x890x0d0xbf0xe60x420x680x410x990x2d0x0f0xb00x540xbb0x16 /*f*/
};
unsigned char invsBox[256] =
{ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
0x520x090x6a0xd50x300x360xa50x380xbf0x400xa30x9e0x810xf30xd70xfb /*0*/
0x7c0xe30x390x820x9b0x2f0xff0x870x340x8e0x430x440xc40xde0xe90xcb /*1*/
0x540x7b0x940x320xa60xc20x230x3d0xee0x4c0x950x0b0x420xfa0xc30x4e /*2*/
0x080x2e0xa10x660x280xd90x240xb20x760x5b0xa20x490x6d0x8b0xd10x25 /*3*/
0x720xf80xf60x640x860x680x980x160xd40xa40x5c0xcc0x5d0x650xb60x92 /*4*/
0x6c0x700x480x500xfd0xed0xb90xda0x5e0x150x460x570xa70x8d0x9d0x84 /*5*/
0x900xd80xab0x000x8c0xbc0xd30x0a0xf70xe40x580x050xb80xb30x450x06 /*6*/
0xd00x2c0x1e0x8f0xca0x3f0x0f0x020xc10xaf0xbd0x030x010x130x8a0x6b /*7*/
0x3a0x910x110x410x4f0x670xdc0xea0x970xf20xcf0x
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1011 2011-02-16 00:53 resource.h
文件 213 2011-02-16 00:13 StdAfx.cpp
文件 1054 2011-02-16 00:13 StdAfx.h
文件 28672 2011-02-22 00:41 Release\FileEncrypt.exe
文件 1078 2011-02-16 00:13 res\FileEncrypt.ico
文件 403 2011-02-16 00:13 res\FileEncrypt.rc2
文件 7872 2011-02-17 21:54 AES.cpp
文件 1258 2011-02-17 21:02 AES.h
文件 36152 2011-02-19 21:01 FileEncrypt.aps
文件 1611 2011-02-20 02:01 FileEncrypt.clw
文件 2133 2011-02-16 00:13 FileEncrypt.cpp
文件 4368 2011-02-17 21:08 FileEncrypt.dsp
文件 545 2011-02-16 00:13 FileEncrypt.dsw
文件 1379 2011-02-16 00:13 FileEncrypt.h
文件 82944 2012-03-11 20:00 FileEncrypt.ncb
文件 53760 2012-03-11 20:00 FileEncrypt.opt
文件 2087 2011-02-22 23:32 FileEncrypt.plg
文件 5983 2011-02-19 21:01 FileEncrypt.rc
文件 10196 2011-02-20 01:06 FileEncryptDlg.cpp
文件 1521 2011-02-17 21:02 FileEncryptDlg.h
文件 3669 2011-02-16 00:13 ReadMe.txt
目录 0 2011-07-23 19:44 Release
目录 0 2011-02-16 00:13 res
----------- --------- ---------- ----- ----
247909 23
相关资源
- 中国1:400万基础地理数据
- AsyncTask文件控制暂停和继续,在状态
- 最新的北京地铁shp文件75146
- 武汉市行政区划shp文件61656
- Rational Rose Common破解文件
- SVR算法程序可运行
- 计算机图形学 边填充算法实现代码
- Web Api 通过文件流 文件到本地
- 右键属性文件校验插件可同时生成十
- CCS中如何生成LIB文件-并在另外CCS项目
- TI CCS V5.4 安装步骤及破解文件
- 清翔电子MCS51开发板资料_新版 01_开发
- 三星DDR800内存条PCB文件和原理图
- ASUS BIOS 加NVME协议文件: Nvme.ffs NV
- 福建师范大学历年算法考卷
- 栈的实现及应用,六种基本算法
- adams vibration 练习原文件
- Bresenham算法绘制线段并利用“橡皮筋
- 介绍几种压缩算法及《笨笨数据压缩
- VC 获得文件属性 获取文件的创建时
- 改进的BP神经网络算法
- STM32基于rt_thread操作系统的SDHC卡文件
- [免费]安全加密软件U盘加密,文件加
- “暴风一号”(“1KB文件夹快捷方式
- A星算法_原理讲解_例子
- 加密cad图形的lisp文件
- 德卡D3读卡器测试程序驱动文件
- dsp2812上128点FFTc程序以及其CMD文件
- 云模型的相关算法cloud
- 旋转矩阵求欧拉角的简单算法
评论
共有 条评论