blob: a5222c51df2913cf439ce39316e878c478257021 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/*
* Random Number Generator
* (C) 1999-2008 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/rng.h>
#include <botan/hmac_rng.h>
#include <botan/internal/algo_registry.h>
namespace Botan {
RandomNumberGenerator* RandomNumberGenerator::make_rng()
{
std::unique_ptr<RandomNumberGenerator> rng(
new HMAC_RNG(make_a<MessageAuthenticationCode>("HMAC(SHA-512)"),
make_a<MessageAuthenticationCode>("HMAC(SHA-256)"))
);
rng->reseed(256);
return rng.release();
}
}
|