diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-01-14 09:27:11 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-01-14 09:27:11 +0000 |
commit | d43a297579c013e6555d20ed92a02f1488a0e15b (patch) | |
tree | 1afe7a0cfac932ab1c522f489d5ffb06b6588334 /libavutil | |
parent | eade86e2f5f5f267633583cab439b3b468b6a700 (diff) | |
download | ffmpeg-d43a297579c013e6555d20ed92a02f1488a0e15b.tar.gz |
cosmetic
Originally committed as revision 7463 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/aes.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavutil/aes.c b/libavutil/aes.c index 7dc4bad5ca..233fbec119 100644 --- a/libavutil/aes.c +++ b/libavutil/aes.c @@ -104,12 +104,12 @@ void av_aes_encrypt(AVAES *a){ } // this is based on the reference AES code by Paulo Barreto and Vincent Rijmen -AVAES *av_aes_init(uint8_t *key, int keyBits) { +AVAES *av_aes_init(uint8_t *key, int key_bits) { AVAES *a; int i, j, t, rconpointer = 0; uint8_t tk[8][4]; - int KC= keyBits/32; - int ROUNDS= KC + 6; + int KC= key_bits/32; + int rounds= KC + 6; if(!sbox[255]){ j=1; @@ -131,16 +131,16 @@ AVAES *av_aes_init(uint8_t *key, int keyBits) { } } - if(keyBits!=128 && keyBits!=192 && keyBits!=256) + if(key_bits!=128 && key_bits!=192 && key_bits!=256) return NULL; a= av_malloc(sizeof(AVAES)); - a->rounds= ROUNDS; + a->rounds= rounds; memcpy(tk, key, KC*4); - for(t= 0; t < (ROUNDS+1)*4; ) { - for(j = 0; (j < KC) && (t < (ROUNDS+1)*4); j++, t++) + for(t= 0; t < (rounds+1)*4; ) { + for(j = 0; (j < KC) && (t < (rounds+1)*4); j++, t++) for(i = 0; i < 4; i++) a->round_key[0][t][i] = tk[j][i]; |