Beispiel #1
0
void aes_init(ctx_aes* aes, int keySize, uint8_t* keyBytes)
{
	SetNbNkNr(aes, keySize);//初始化
	memcpy(aes->key,keyBytes,keySize);
	KeyExpansion(aes);
	/* expand the seed key into a key schedule and store in w */
}
Beispiel #2
0
Datei: aes.c Projekt: LinLL/ipc
void InitAes(int keySize, unsigned char* keyBytes)
{
	SetNbNkNr(keySize);//��ʼ��
	memcpy(key,keyBytes,keySize);
	KeyExpansion();
	// expand the seed key into a key schedule and store in w
}  // Aes constructor
Beispiel #3
0
void Aes_setKey(int keysize,BYTE* keyBytes,BYTE *w,BYTE *key,BYTE* Nr,BYTE *Nk)
{
	SetNbNkNr(keysize,Nr,Nk);
	AES_Memcpy(key,keyBytes,keysize);
	KeyExpansion(w,key,*Nr,*Nk);
}