資源簡(jiǎn)介
目前網(wǎng)絡(luò)上的aes代碼大多數(shù)只能對(duì)8/16字節(jié)的整數(shù)倍長(zhǎng)度數(shù)據(jù)進(jìn)行加密,這個(gè)例子可以對(duì)任意長(zhǎng)度數(shù)據(jù)進(jìn)行加密(包括0字節(jié))

代碼片段和文件信息
//?GetUniqueID.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“AESTestApp.h“
#include?“AESTestDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif
//?CAesTestApp
BEGIN_MESSAGE_MAP(CAesTestApp?CWinApp)
ON_COMMAND(ID_HELP?&CWinApp::onhelp)
END_MESSAGE_MAP()
//?CAesTestApp?construction
CAesTestApp::CAesTestApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
//?The?one?and?only?CAesTestApp?object
CAesTestApp?theApp;
//?CAesTestApp?initialization
BOOL?CAesTestApp::InitInstance()
{
//?InitCommonControlsEx()?is?required?on?Windows?XP?if?an?application
//?manifest?specifies?use?of?ComCtl32.dll?version?6?or?later?to?enable
//?visual?styles.??Otherwise?any?window?creation?will?fail.
INITCOMMONCONTROLSEX?InitCtrls;
InitCtrls.dwSize?=?sizeof(InitCtrls);
//?Set?this?to?include?all?the?common?control?classes?you?want?to?use
//?in?your?application.
InitCtrls.dwICC?=?ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinApp::InitInstance();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//?of?your?final?executable?you?should?remove?from?the?following
//?the?specific?initialization?routines?you?do?not?need
//?Change?the?registry?key?under?which?our?settings?are?stored
//?TODO:?You?should?modify?this?string?to?be?something?appropriate
//?such?as?the?name?of?your?company?or?organization
SetRegistryKey(_T(“Local?AppWizard-Generated?Applications“));
CAesTestDlg?dlg;
m_pMainWnd?=?&dlg;
INT_PTR?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????目錄???????????0??2013-01-21?18:16??AESdemo\
?????目錄???????????0??2013-01-21?16:41??AESdemo\aes\
?????文件????????5871??2013-01-21?18:06??AESdemo\aes.rc
?????文件????????6138??2013-01-21?18:14??AESdemo\AES.vcproj
?????文件?????????875??2013-01-21?17:58??AESdemo\AESDemo.sln
?????文件???????11264??2013-01-21?18:16??AESdemo\AESDemo.suo
?????文件????????2073??2013-01-21?17:42??AESdemo\AESTestApp.cpp
?????文件?????????520??2013-01-21?17:40??AESdemo\AESTestApp.h
?????文件????????3961??2013-01-21?17:42??AESdemo\AESTestDlg.cpp
?????文件?????????760??2013-01-21?17:47??AESdemo\AESTestDlg.h
?????文件????????4477??2013-01-21?18:14??AESdemo\aeswrapper.h
?????文件????????7267??2012-08-28?14:43??AESdemo\aes\aes.h
?????文件????????4983??2011-01-14?20:03??AESdemo\aes\aescpp.h
?????文件???????10139??2011-01-14?20:05??AESdemo\aes\aescrypt.c
?????文件???????16384??2011-01-14?20:01??AESdemo\aes\aeskey.c
?????文件???????26822??2011-01-14?19:59??AESdemo\aes\aesopt.h
?????文件???????15633??2011-01-14?20:01??AESdemo\aes\aestab.c
?????文件????????5332??2011-01-14?19:59??AESdemo\aes\aestab.h
?????文件???????31403??2012-08-28?14:43??AESdemo\aes\aes_modes.c
?????文件???????17409??2011-04-29?16:32??AESdemo\aes\aes_via_ace.h
?????文件????????5290??2011-01-14?19:59??AESdemo\aes\brg_endian.h
?????文件????????8194??2011-09-10?18:14??AESdemo\aes\brg_types.h
?????文件????????1575??2008-07-08?11:04??AESdemo\aes\rdtsc.h
?????文件???????12774??2011-01-14?20:12??AESdemo\aes\tablegen.c
?????目錄???????????0??2013-01-21?18:16??AESdemo\Release\
?????文件??????335872??2013-01-21?18:15??AESdemo\Release\AESDemo.exe
?????目錄???????????0??2013-01-21?17:49??AESdemo\res\
?????文件????????1227??2013-01-21?18:00??AESdemo\resource.h
?????文件???????67777??2007-11-28?16:21??AESdemo\res\aes.ico
?????文件?????????402??2012-08-20?10:00??AESdemo\res\aes.rc2
?????文件?????????213??2012-08-20?10:00??AESdemo\stdafx.cpp
............此處省略2個(gè)文件信息
評(píng)論
共有 條評(píng)論