aboutsummaryrefslogtreecommitdiff
path: root/src/common/crypto.h
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-10-12 20:20:19 +0000
committerRoger Dingledine <arma@torproject.org>2004-10-12 20:20:19 +0000
commita7d858bd6efe6e5605f02426594e546008f1427c (patch)
treee0e554d704b2faf68c3563c04241bd4950b16ca3 /src/common/crypto.h
parent7cc126e8a99a6f73888bcc3add84cc74d1fd273d (diff)
downloadtor-a7d858bd6efe6e5605f02426594e546008f1427c.tar
tor-a7d858bd6efe6e5605f02426594e546008f1427c.tar.gz
start the great migration from int to size_t
and clean some deadweight from util.h svn:r2455
Diffstat (limited to 'src/common/crypto.h')
-rw-r--r--src/common/crypto.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 6d1e230b2..1828fb30a 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -92,22 +92,22 @@ int crypto_pk_get_digest(crypto_pk_env_t *pk, char *digest_out);
int crypto_pk_get_fingerprint(crypto_pk_env_t *pk, char *fp_out,int add_space);
int crypto_pk_check_fingerprint_syntax(const char *s);
-int base64_encode(char *dest, int destlen, const char *src, int srclen);
-int base64_decode(char *dest, int destlen, const char *src, int srclen);
+int base64_encode(char *dest, size_t destlen, const char *src, size_t srclen);
+int base64_decode(char *dest, size_t destlen, const char *src, size_t srclen);
#define BASE32_CHARS "abcdefghijklmnopqrstuvwxyz234567"
-void base32_encode(char *dest, int destlen, const char *src, int srclen);
-void base16_encode(char *dest, int destlen, const char *src, int srclen);
-int base16_decode(char *dest, int destlen, const char *src, int srclen);
+void base32_encode(char *dest, size_t destlen, const char *src, size_t srclen);
+void base16_encode(char *dest, size_t destlen, const char *src, size_t srclen);
+int base16_decode(char *dest, size_t destlen, const char *src, size_t srclen);
/* Key negotiation */
crypto_dh_env_t *crypto_dh_new();
int crypto_dh_get_bytes(crypto_dh_env_t *dh);
int crypto_dh_generate_public(crypto_dh_env_t *dh);
int crypto_dh_get_public(crypto_dh_env_t *dh, char *pubkey_out,
- int pubkey_out_len);
+ size_t pubkey_out_len);
int crypto_dh_compute_secret(crypto_dh_env_t *dh,
- const char *pubkey, int pubkey_len,
- char *secret_out, int secret_out_len);
+ const char *pubkey, size_t pubkey_len,
+ char *secret_out, size_t secret_out_len);
void crypto_dh_free(crypto_dh_env_t *dh);
/* symmetric crypto */