aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-02-05 20:41:13 +0000
committerlloyd <[email protected]>2010-02-05 20:41:13 +0000
commit3c8bfb624e321e5a56938fc27f9312cfd3d23d97 (patch)
tree8cce22b63e6775a12d6ebd896652d4bcba9cdceb /doc/examples
parentc9ce8388a2fd3fb93d5afead65626eef3d2d938b (diff)
Further passhash changes before release and things have to be
finalized. Move header to passhash9.h and rename the functions to be passhash9 specific ({generator,check}_passhash9) Add an algorithm identifer field. Currently only id 0 is defined, for HMAC(SHA-1), but this opens up for using HMAC(SHA-512) or HMAC(SHA-3) or CMAC(Blowfish) or whatever in the future if necessary. Increase the salt size to 96 bits and the PRF output size to 192 bits. Document in api.tex
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/passhash.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/examples/passhash.cpp b/doc/examples/passhash.cpp
index 1e4c8c505..586c28c3f 100644
--- a/doc/examples/passhash.cpp
+++ b/doc/examples/passhash.cpp
@@ -5,7 +5,7 @@
*/
#include <botan/botan.h>
-#include <botan/passhash.h>
+#include <botan/passhash9.h>
#include <iostream>
#include <memory>
@@ -30,11 +30,11 @@ int main(int argc, char* argv[])
Botan::AutoSeeded_RNG rng;
std::cout << "H('" << argv[1] << "') = "
- << Botan::password_hash(argv[1], rng) << '\n';
+ << Botan::generate_passhash9(argv[1], rng) << '\n';
}
else
{
- bool ok = Botan::password_hash_ok(argv[1], argv[2]);
+ bool ok = Botan::check_passhash9(argv[1], argv[2]);
if(ok)
std::cout << "Password and hash match\n";
else