diff options
Diffstat (limited to 'src/common/aes.c')
-rw-r--r-- | src/common/aes.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/aes.c b/src/common/aes.c index 570173bd71..e4b3c8316d 100644 --- a/src/common/aes.c +++ b/src/common/aes.c @@ -67,7 +67,7 @@ _aes_fill_buf(aes_cnt_cipher_t *cipher) aes_cnt_cipher_t* aes_new_cipher() { - aes_cnt_cipher_t* result = (aes_cnt_cipher_t*) tor_malloc(sizeof(aes_cnt_cipher_t)); + aes_cnt_cipher_t* result = tor_malloc(sizeof(aes_cnt_cipher_t)); memset(result->rk, 0, 4*(MAXNR+1)); memset(result->buf, 0, 16); @@ -75,7 +75,7 @@ aes_new_cipher() } void -aes_set_key(aes_cnt_cipher_t *cipher, unsigned char *key, int key_bits) +aes_set_key(aes_cnt_cipher_t *cipher, const unsigned char *key, int key_bits) { cipher->nr = rijndaelKeySetupEnc(cipher->rk, key, key_bits); cipher->counter0 = 0; @@ -93,7 +93,7 @@ aes_free_cipher(aes_cnt_cipher_t *cipher) } void -aes_crypt(aes_cnt_cipher_t *cipher, char *input, int len, char *output) +aes_crypt(aes_cnt_cipher_t *cipher, const char *input, int len, char *output) { int c = cipher->pos; if (!len) return; |