diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-08-30 10:42:02 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-09-25 11:58:13 -0400 |
commit | 2b2cab41414fddd0221b2f5c2f3010131ae81df4 (patch) | |
tree | 6ec62af510ac3073499bb86e214dc5eff7b6a440 /src/common/crypto_s2k.h | |
parent | 8184839a47ed1c7b42993d69d54e757a43bfda9c (diff) | |
download | tor-2b2cab41414fddd0221b2f5c2f3010131ae81df4.tar.gz tor-2b2cab41414fddd0221b2f5c2f3010131ae81df4.zip |
Tweak and expose secret_to_key_compute_key for testing
Doing this lets me pass in a salt of an unusual length.
Diffstat (limited to 'src/common/crypto_s2k.h')
-rw-r--r-- | src/common/crypto_s2k.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/crypto_s2k.h b/src/common/crypto_s2k.h index abd8014318..3693a430e7 100644 --- a/src/common/crypto_s2k.h +++ b/src/common/crypto_s2k.h @@ -62,5 +62,12 @@ int secret_to_key_derivekey(uint8_t *key_out, size_t key_out_len, const uint8_t *spec, size_t spec_len, const char *secret, size_t secret_len); +#ifdef CRYPTO_S2K_PRIVATE +STATIC int secret_to_key_compute_key(uint8_t *key_out, size_t key_out_len, + const uint8_t *spec, size_t spec_len, + const char *secret, size_t secret_len, + int type); +#endif + #endif |