comparison aes.c @ 241:998d097d926d libavutil

make key parameter const
author bcoudurier
date Sun, 11 Feb 2007 16:57:17 +0000
parents 6ff860ccdcff
children 980e486fcda1
comparison
equal deleted inserted replaced
240:80f17646fa2d 241:998d097d926d
118 tbl[4*j+i]= tbl[4*j + ((i-1)&3) - 1024]; 118 tbl[4*j+i]= tbl[4*j + ((i-1)&3) - 1024];
119 #endif 119 #endif
120 } 120 }
121 121
122 // this is based on the reference AES code by Paulo Barreto and Vincent Rijmen 122 // this is based on the reference AES code by Paulo Barreto and Vincent Rijmen
123 int av_aes_init(AVAES *a, uint8_t *key, int key_bits, int decrypt) { 123 int av_aes_init(AVAES *a, const uint8_t *key, int key_bits, int decrypt) {
124 int i, j, t, rconpointer = 0; 124 int i, j, t, rconpointer = 0;
125 uint8_t tk[8][4]; 125 uint8_t tk[8][4];
126 int KC= key_bits>>5; 126 int KC= key_bits>>5;
127 int rounds= KC + 6; 127 int rounds= KC + 6;
128 uint8_t log8[256]; 128 uint8_t log8[256];