Commit 06102942 authored by michael's avatar michael

avoid memcpy()


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7549 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent dbc7376b
...@@ -172,10 +172,9 @@ int av_aes_init(AVAES *a, uint8_t *key, int key_bits, int decrypt) { ...@@ -172,10 +172,9 @@ int av_aes_init(AVAES *a, uint8_t *key, int key_bits, int decrypt) {
if(decrypt){ if(decrypt){
for(i=1; i<rounds; i++){ for(i=1; i<rounds; i++){
uint8_t tmp[2][16]; uint8_t tmp[3][16];
memcpy(tmp[1], a->round_key[i][0], 16); memcpy(tmp[2], a->round_key[i][0], 16);
subshift(tmp[0], 0, sbox); subshift(tmp[1], 0, sbox);
memcpy(tmp[1], tmp[0], 16);
mix(tmp, dec_multbl, 1, 3); mix(tmp, dec_multbl, 1, 3);
memcpy(a->round_key[i][0], tmp[0], 16); memcpy(a->round_key[i][0], tmp[0], 16);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment