Botan  1.11.15
src/lib/rng/rng.cpp
Go to the documentation of this file.
00001 /*
00002 * Random Number Generator
00003 * (C) 1999-2008 Jack Lloyd
00004 *
00005 * Botan is released under the Simplified BSD License (see license.txt)
00006 */
00007 
00008 #include <botan/rng.h>
00009 #include <botan/hmac_rng.h>
00010 #include <botan/internal/algo_registry.h>
00011 
00012 namespace Botan {
00013 
00014 RandomNumberGenerator* RandomNumberGenerator::make_rng()
00015    {
00016    std::unique_ptr<RandomNumberGenerator> rng(
00017       new HMAC_RNG(make_a<MessageAuthenticationCode>("HMAC(SHA-512)"),
00018                    make_a<MessageAuthenticationCode>("HMAC(SHA-256)"))
00019       );
00020 
00021    rng->reseed(256);
00022 
00023    return rng.release();
00024    }
00025 
00026 }