summaryrefslogtreecommitdiff
path: root/src/common/crypto.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-09-29 00:48:45 -0400
committerNick Mathewson <nickm@torproject.org>2009-09-29 00:53:25 -0400
commitcfba9c01bf37a3c2f67b18275522df81c081e898 (patch)
treea2e73638810f9c5528e74f5c7e273bdd83d91e2a /src/common/crypto.h
parent76d26ae52d655e9fd0549eacbba9c7e2d5c05cc4 (diff)
downloadtor-cfba9c01bf37a3c2f67b18275522df81c081e898.tar.gz
tor-cfba9c01bf37a3c2f67b18275522df81c081e898.zip
Alter keygen function to generate keys of different lengths.
Diffstat (limited to 'src/common/crypto.h')
-rw-r--r--src/common/crypto.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 515b870f3d..f0958a8073 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -86,7 +86,9 @@ crypto_cipher_env_t *crypto_new_cipher_env(void);
void crypto_free_cipher_env(crypto_cipher_env_t *env);
/* public key crypto */
-int crypto_pk_generate_key(crypto_pk_env_t *env);
+int crypto_pk_generate_key_with_bits(crypto_pk_env_t *env, int bits);
+#define crypto_pk_generate_key(env) \
+ crypto_pk_generate_key_with_bits((env), (PK_BYTES*8))
int crypto_pk_read_private_key_from_filename(crypto_pk_env_t *env,
const char *keyfile);