summaryrefslogtreecommitdiff
path: root/src/common/aes.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-05-07 05:55:06 +0000
committerNick Mathewson <nickm@torproject.org>2005-05-07 05:55:06 +0000
commit10b2208d9386972b76f10c2557562b5912dd130e (patch)
tree007a393aff385b1cbe47ffdc4d377edb5dac9898 /src/common/aes.c
parent6567ec9ccf108ac2b51da77fff5e00b722640765 (diff)
downloadtor-10b2208d9386972b76f10c2557562b5912dd130e.tar.gz
tor-10b2208d9386972b76f10c2557562b5912dd130e.zip
Make Tor compile with no warnings with gcc4.0 on OSX
svn:r4184
Diffstat (limited to 'src/common/aes.c')
-rw-r--r--src/common/aes.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/aes.c b/src/common/aes.c
index c1e05f1009..1f7195cbc2 100644
--- a/src/common/aes.c
+++ b/src/common/aes.c
@@ -84,9 +84,10 @@ aes_new_cipher()
* the counter to 0.
*/
void
-aes_set_key(aes_cnt_cipher_t *cipher, const unsigned char *key, int key_bits)
+aes_set_key(aes_cnt_cipher_t *cipher, const char *key, int key_bits)
{
- cipher->nr = rijndaelKeySetupEnc(cipher->rk, key, key_bits);
+ cipher->nr = rijndaelKeySetupEnc(cipher->rk, (const unsigned char*)key,
+ key_bits);
cipher->counter0 = 0;
cipher->counter1 = 0;
cipher->pos = 0;
@@ -108,7 +109,7 @@ aes_free_cipher(aes_cnt_cipher_t *cipher)
* by <b>len</b> bytes as it encrypts.
*/
void
-aes_crypt(aes_cnt_cipher_t *cipher, const char *input, int len, char *output)
+aes_crypt(aes_cnt_cipher_t *cipher, const char *input, size_t len, char *output)
{
int c = cipher->pos;
if (!len) return;