C++??????AES??
???????????? ???????[ 2014/12/17 11:03:46 ] ????????C++ ???? ??
????????????????????????????????????????(?????????????????????????????)????Demo?????AES??????????????????ECB/PKCS5Padding??????С????????
????????????????????key????????md5????????demo??????? C++???????MD5?? ?????????
#ifndef _AES_20140317_H_
#define _AES_20140317_H_
#define Bits128 16
#define Bits192 24
#define Bits256 32
#define ENCRYPT_BLOCK_SIZE 16
#define SUCESS 0
#define TRUE 1
#include "md5.h"
#include <stdio.h>
#include <malloc.h>
typedef unsigned char _u8;
typedef int _int32;
typedef unsigned int _u32;
typedef struct
{
_int32 Nb;
_int32 Nk;
_int32 Nr;
_u8 State[4][4];
_u8 key[32];
_u8 w[16 * 15];
} ctx_aes;
enum AESKeyLength
{
AES_KEY_LENGTH_16 = 16?? AES_KEY_LENGTH_24 = 24?? AES_KEY_LENGTH_32 = 32
};
namespace comm
{
namespace util
{
class AES
{
public:
AES();
~AES()
{
if (Sbox != NULL)
{
delete []Sbox;
Sbox = NULL;
}
if (iSbox != NULL)
{
delete []iSbox;
iSbox = NULL;
}
if (Rcon != NULL)
{
delete []Rcon;
Rcon = NULL;
}
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11