From 82ab6d27cc2b434b4b7ffa528396d67fe6993222 Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 3 Mar 2010 02:02:48 +0000 Subject: Fix minor errors and warnings in the examples. Remove boost dependency from rng_test example. --- doc/examples/hash_quickly.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'doc/examples/hash_quickly.cpp') diff --git a/doc/examples/hash_quickly.cpp b/doc/examples/hash_quickly.cpp index a5236b381..1af0e8f45 100644 --- a/doc/examples/hash_quickly.cpp +++ b/doc/examples/hash_quickly.cpp @@ -4,16 +4,6 @@ * Distributed under the terms of the Botan license */ -#include -#include -#include - -#include -#include -#include -#include -#include - /* Try to find the fastest SHA-1 implementation and use it to hash files. In most programs this isn't worth the bother and @@ -25,6 +15,18 @@ Of course you could also just do this once and save it as an application config, which is probably the smart thing to do. */ +#include +#include +#include + +#include +#include +#include +#include +#include + +namespace { + void set_fastest_implementation(const std::string& algo, Botan::RandomNumberGenerator& rng, double ms = 30) @@ -54,6 +56,8 @@ void set_fastest_implementation(const std::string& algo, af.set_preferred_provider(algo, fastest_provider); } +} + int main(int argc, char* argv[]) { if(argc <= 1) -- cgit v1.2.3