?? testaes.c
字號(hào):
#include <stdio.h>
#include <reg51.h>
#include "AES_Lib.h"
AES_U8 in[16] = {0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,
0x88,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff};
//AES_U8 key[16] = {0xf0,0xe0,0xd0,0xc0,0xb0,0xa0,0x90,0x80,
// 0x70,0x60,0x50,0x40,0x30,0x20,0x10,0x00};
AES_U8 key[16] = {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f};
AES_U8 out[16];
void main (void)
{
AES_U8 xdata expKey[4 * Nc * (Nr + 1)];
AES_U16 idx;
//以下是在標(biāo)準(zhǔn)MSC51核上運(yùn)行的時(shí)間,24M晶振
AES_ExpandKey (key, expKey); //10.4ms
memset(out, 0, sizeof (out)); //45us
AES_Encrypt (in, expKey, out); //8.5ms
memset(in, 0, sizeof (in)); //45us
AES_Decrypt (out, expKey, in); //10.7ms
idx = 0;
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -