diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-10-18 11:35:49 -0700 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-08-28 11:20:31 -0400 |
commit | 9b2d8c4e20a57ce849395a2135ac4e720bf99c42 (patch) | |
tree | 1e45c14f8fe94cbd8ac4f6c3a0f5af055ea0a1bc /src/common | |
parent | cc3b04a8c1edbeb1a488e319e3c0d28acd227417 (diff) | |
download | tor-9b2d8c4e20a57ce849395a2135ac4e720bf99c42.tar.gz tor-9b2d8c4e20a57ce849395a2135ac4e720bf99c42.zip |
Rename secret_to_key to secret_to_key_rfc2440
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/crypto.c | 2 | ||||
-rw-r--r-- | src/common/crypto.h | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index 014c83e850..a3e767e6f5 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -3008,7 +3008,7 @@ base32_decode(char *dest, size_t destlen, const char *src, size_t srclen) * Does not support <b>key_out_len</b> > DIGEST_LEN. */ void -secret_to_key(char *key_out, size_t key_out_len, const char *secret, +secret_to_key_rfc2440(char *key_out, size_t key_out_len, const char *secret, size_t secret_len, const char *s2k_specifier) { crypto_digest_t *d; diff --git a/src/common/crypto.h b/src/common/crypto.h index aa4271aa33..ba6fe84f0d 100644 --- a/src/common/crypto.h +++ b/src/common/crypto.h @@ -282,8 +282,9 @@ int digest256_from_base64(char *digest, const char *d64); /** Length of RFC2440-style S2K specifier: the first 8 bytes are a salt, the * 9th describes how much iteration to do. */ -#define S2K_SPECIFIER_LEN 9 -void secret_to_key(char *key_out, size_t key_out_len, const char *secret, +#define S2K_RFC2440_SPECIFIER_LEN 9 +void secret_to_key_rfc2440( + char *key_out, size_t key_out_len, const char *secret, size_t secret_len, const char *s2k_specifier); /** OpenSSL-based utility functions. */ |