diff options
author | lloyd <[email protected]> | 2008-04-12 17:33:18 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-04-12 17:33:18 +0000 |
commit | e9590a1054722891b7d99a42fe2c81a5911e6c75 (patch) | |
tree | 84aec57b0625c49e56f095c034d485e1cb219ab3 /src/rng.cpp | |
parent | 63940629afb21e4cbfcbdddb2933fe79e4bef3c3 (diff) | |
parent | f15ca39257de8983babb95f7f5d589a4e555a864 (diff) |
propagate from branch 'net.randombit.botan' (head bcae6a19d8d96ebde33c832c76a130ea02bc923a)
to branch 'net.randombit.botan.remove-libstate' (head f640991b6e433a264f5d22a08338cfc9c24c82da)
Diffstat (limited to 'src/rng.cpp')
-rw-r--r-- | src/rng.cpp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/rng.cpp b/src/rng.cpp deleted file mode 100644 index dc93b56f6..000000000 --- a/src/rng.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/************************************************* -* Global RNG Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ - -#include <botan/rng.h> -#include <botan/libstate.h> - -namespace Botan { - -namespace Global_RNG { - -/************************************************* -* Get random bits from the global RNG * -*************************************************/ -void randomize(byte output[], u32bit size) - { - global_state().randomize(output, size); - } - -/************************************************* -* Get random bits from the global RNG * -*************************************************/ -byte random() - { - byte ret = 0; - randomize(&ret, 1); - return ret; - } - -/************************************************* -* Add entropy to the global RNG * -*************************************************/ -void add_entropy(const byte entropy[], u32bit size) - { - global_state().add_entropy(entropy, size); - } - -/************************************************* -* Add entropy to the global RNG * -*************************************************/ -void add_entropy(EntropySource& src, bool slow_poll) - { - global_state().add_entropy(src, slow_poll); - } - -/************************************************* -* Add an EntropySource to the RNG seed list * -*************************************************/ -void add_es(EntropySource* src, bool last) - { - global_state().add_entropy_source(src, last); - } - -/************************************************* -* Seed the global RNG * -*************************************************/ -u32bit seed(bool slow_poll, u32bit bits_to_get) - { - return global_state().seed_prng(slow_poll, bits_to_get); - } - -} - -} |