aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-02-02 10:48:48 +0000
committerlloyd <[email protected]>2010-02-02 10:48:48 +0000
commitcf3e984dbffc0fb2a695306a9b4d53257bb74ea8 (patch)
treefbe0e6326c0bf33e3540f9b7b1905aba1e5cf755 /doc
parent121ca16daa158315682373213e150d9c18c28cdb (diff)
Prefix passhash with "$9$" in a manner similar with other
password hashing schemes. Increase salt size to 80 bits. Research shows that virtually no other PBKDF2 implementations support anything but SHA-1; for ease of implementation elsehwere switch back from SHA-512 to SHA-1. Should be mostly harmless; it limits total entropy of the password to a maximum of 160 bits, but this is unlikely anyway. Use two bytes to specify the work factor for future-proofing. Add a test.
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/passhash.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/doc/examples/passhash.cpp b/doc/examples/passhash.cpp
index 0949e944c..1e4c8c505 100644
--- a/doc/examples/passhash.cpp
+++ b/doc/examples/passhash.cpp
@@ -29,10 +29,8 @@ int main(int argc, char* argv[])
{
Botan::AutoSeeded_RNG rng;
- Botan::u32bit work_factor = 10;
-
std::cout << "H('" << argv[1] << "') = "
- << Botan::password_hash(argv[1], rng, work_factor) << '\n';
+ << Botan::password_hash(argv[1], rng) << '\n';
}
else
{