aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-05-24 19:14:55 +0000
committerlloyd <[email protected]>2008-05-24 19:14:55 +0000
commit440a5d6bd0de20027d8c094abdd1390ee23eae6f (patch)
tree03d8b07d4f606b70963acfcfcfec28eae7210745 /doc/examples
parentbe4c408997cf182d974c33b1c62d7f6605c55f3e (diff)
Update passhash example with new S2K::new_random_salt signature
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/passhash.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/examples/passhash.cpp b/doc/examples/passhash.cpp
index a270e8256..f8bac1443 100644
--- a/doc/examples/passhash.cpp
+++ b/doc/examples/passhash.cpp
@@ -1,5 +1,6 @@
#include <botan/botan.h>
#include <botan/pkcs5.h>
+#include <botan/libstate.h>
#include <iostream>
using namespace Botan;
@@ -43,7 +44,7 @@ std::string password_hash(const std::string& pass)
PKCS5_PBKDF2 kdf("SHA-1");
kdf.set_iterations(10000);
- kdf.new_random_salt(6); // 48 bits
+ kdf.new_random_salt(global_state().prng_reference(), 6); // 48 bits
Pipe pipe(new Base64_Encoder);
pipe.start_msg();