aboutsummaryrefslogtreecommitdiffstats
path: root/checks/dolook.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-02-01 16:29:38 +0000
committerlloyd <[email protected]>2010-02-01 16:29:38 +0000
commit454e45b7c4fece11a7f43ffa412148b4a274c90f (patch)
tree5ae87c2104fba534548e59fa477d6a5f2f5a5e29 /checks/dolook.cpp
parentae6a404ec14cc3c86a96cd3e5c67c9c23be38147 (diff)
Modify the S2K interface. Instead of being stateful in terms of the salt
and iteration count, force it to be passed to each call to derive_key. So remove current_salt, set_iterations, new_random_salt, and change_salt functions from S2K interface. Update examples and test application to match. While I was in there, change the passhash example to use 64 bit salts and 128 bit PBKDF2 outputs.
Diffstat (limited to 'checks/dolook.cpp')
-rw-r--r--checks/dolook.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/checks/dolook.cpp b/checks/dolook.cpp
index 28ac60c1b..aa2d58e1f 100644
--- a/checks/dolook.cpp
+++ b/checks/dolook.cpp
@@ -60,9 +60,9 @@ class S2K_Filter : public Filter
{ passphrase += std::string(reinterpret_cast<const char*>(in), len); }
void end_msg()
{
- s2k->change_salt(salt, salt.size());
- s2k->set_iterations(iterations);
- SymmetricKey x = s2k->derive_key(outlen, passphrase);
+ SymmetricKey x = s2k->derive_key(outlen, passphrase,
+ &salt[0], salt.size(),
+ iterations);
send(x.bits_of());
}
S2K_Filter(S2K* algo, const SymmetricKey& s, u32bit o, u32bit i)