From 137b577bbd52a2da8f35a6b38514457868460e36 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sat, 3 Apr 2004 02:40:30 +0000 Subject: Refactor the heck out of crypto interface: admit that we will stick with one ciphersuite at a time, make const things const, and stop putting openssl in the headers. svn:r1458 --- src/common/aes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/common/aes.c') 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; -- cgit v1.2.3-54-g00ecf