aboutsummaryrefslogtreecommitdiffstats
path: root/include/x931_rng.h
Commit message (Collapse)AuthorAgeFilesLines
* Add interfaces for add_entropy_source and add_entropy tolloyd2008-06-281-0/+2
| | | | | | | | | | | RandomNumberGenerator, and make ANSI_X931_PRNG's implementations just forward the arguments to the underlying RNG. This allows seeding the RNG even if no entropy modules are loaded into the library. Also it allows actually adding user-specified data; to do it otherwise would require creating the RNG objects yourself and retaining a pointer to the Randpool, which is pretty bogus. Move Null_RNG to rng.h
* New structure for entropy sources + RNGs. The entropy sources are owned bylloyd2008-06-271-2/+3
| | | | | | | Randpool, it will query them as needed (or if asked to do so). New function make_rng() that creates an RNG (X9.31 backed by a Randpool) and seeds it. Remove the entropy source related code from the Modules/Builtin_Modules classes.
* Remove PRNG_Unseeded throw() specifies from the RNG randomize() functions.lloyd2008-06-271-1/+1
| | | | | | They were probably not a good idea. If nothing else, these functions might throw bad_alloc, and possibly other errors. Something broad like std::exception might be applicable, but that seems pointlessly broad.
* Move the declaration of the RandomNumberGenerator base class from base.hlloyd2008-06-101-0/+1
| | | | to rng.h (eventually base.h will be split up entirely and go away)
* Remove both default arguments to the constructor of ANSI_X931_RNG.lloyd2008-05-241-1/+1
| | | | | | | | | | | | | | | | | | If the second argument was NULL, it would default to a new Randpool. But this introduces an annoying dependency: really it is the caller who is relying on Randpool. Make this explicit by passing a new Randpool pointer to the constructor in Library_State. This will break all callers using ANSI_X931_RNG's constructors with default arguments. To regain the previous behavior, change: ANSI_X931_RNG rng; ANSI_X931_RNG rng("/*cipher name*/"); to ANSI_X931_RNG rng(/*cipher name, default was AES-256 */, new Randpool); You are free to pass another PRNG object if you like. This make require inclusion of <botan/randpool.h>
* Add BOTAN_DLL macro in all needed spots for working DLL export. Basedlloyd2008-04-211-1/+1
| | | | | | | | | | | | on a patch from Joel Low for MSVC, modified and tested with GCC using -fvisibility=hidden and the visibility attribute. Getting this working completely requires making the shared object and static lib builds completely distinct (which is also a win since it allows avoiding -fPIC usage, etc in the static lib). Currently too many things are being exported, though it is an improvement as internal-only code like the bigint_* functions are hidden.
* Change the copyrights in all files in the Botan tree to directly reflectlloyd2008-04-101-1/+1
| | | | | | the actual copyright holders. For rationale, see my post to botan-devel on April 9, subject 'Changing license to directly reflect contributors' (http://www.randombit.net/pipermail/botan-devel/2008-April/000527.html)
* Mostly revert 2f4fd18182d5a75c40cd831e7ee3c314be5c57d6, only keep thelloyd2008-03-101-1/+1
| | | | | updated dates on files that have actually changed this year. This makes the diff across versions readable again.
* Mass update of the copyright date. Honestly I don't know why I bother,lloyd2008-02-141-1/+1
| | | | | | | but might as well keep it up to date. And it's easier to do it once with a 'perl -pi' command than to update each file over time. Apologies to anyone looking at diffs.
* Bump copyright year to 2007lloyd2007-01-201-1/+1
|
* Initial checkin1.5.6lloyd2006-05-181-0/+38