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/or/main.c | |
parent | cc3b04a8c1edbeb1a488e319e3c0d28acd227417 (diff) | |
download | tor-9b2d8c4e20a57ce849395a2135ac4e720bf99c42.tar.gz tor-9b2d8c4e20a57ce849395a2135ac4e720bf99c42.zip |
Rename secret_to_key to secret_to_key_rfc2440
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/main.c b/src/or/main.c index 094120fecf..4ead8aa35c 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -2674,11 +2674,11 @@ do_hash_password(void) { char output[256]; - char key[S2K_SPECIFIER_LEN+DIGEST_LEN]; + char key[S2K_RFC2440_SPECIFIER_LEN+DIGEST_LEN]; - crypto_rand(key, S2K_SPECIFIER_LEN-1); - key[S2K_SPECIFIER_LEN-1] = (uint8_t)96; /* Hash 64 K of data. */ - secret_to_key(key+S2K_SPECIFIER_LEN, DIGEST_LEN, + crypto_rand(key, S2K_RFC2440_SPECIFIER_LEN-1); + key[S2K_RFC2440_SPECIFIER_LEN-1] = (uint8_t)96; /* Hash 64 K of data. */ + secret_to_key_rfc2440(key+S2K_RFC2440_SPECIFIER_LEN, DIGEST_LEN, get_options()->command_arg, strlen(get_options()->command_arg), key); base16_encode(output, sizeof(output), key, sizeof(key)); |