summaryrefslogtreecommitdiff
path: root/src/common/aes.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-04-03 02:40:30 +0000
committerNick Mathewson <nickm@torproject.org>2004-04-03 02:40:30 +0000
commit137b577bbd52a2da8f35a6b38514457868460e36 (patch)
tree24397d6dedb7c48bd46b4f0f0f69a4ad61d1cba3 /src/common/aes.c
parent3dc3d0c4ccc95b2a30f9c13386c56b4e4b1edf06 (diff)
downloadtor-137b577bbd52a2da8f35a6b38514457868460e36.tar.gz
tor-137b577bbd52a2da8f35a6b38514457868460e36.zip
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
Diffstat (limited to 'src/common/aes.c')
-rw-r--r--src/common/aes.c6
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;