1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Originally committed as revision 7499 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2007-01-14 21:03:15 +00:00
parent 1b10524312
commit 8d4ae47c3f

View File

@ -158,7 +158,9 @@ AVAES *av_aes_init(uint8_t *key, int key_bits, int decrypt) {
memcpy(tk, key, KC*4);
for(t= 0; t < (rounds+1)*4;) {
memcpy(a->round_key[0][t], tk, KC*4);
if(decrypt) memcpy(a->round_key[0 ][ t], tk, KC*4);
else memcpy(a->round_key[rounds][-t], tk, KC*4);
t+= KC;
for(i = 0; i < 4; i++)
@ -179,11 +181,6 @@ AVAES *av_aes_init(uint8_t *key, int key_bits, int decrypt) {
a->round_key[i][0][j]= sbox[a->round_key[i][0][j]];
mix(a->round_key[i], dec_multbl);
}
}else{
for(i=0; i<(rounds+1)/2; i++){
for(j=0; j<16; j++)
FFSWAP(int, a->round_key[i][0][j], a->round_key[rounds-i][0][j]);
}
}
return a;