8 #include <botan/bigint.h>
9 #include <botan/parsing.h>
41 array[0] &= 0xFF >> (8 - (bitsize % 8));
42 array[0] |= 0x80 >> ((bitsize % 8) ? (8 - bitsize % 8) : 0);
58 return (min + (
BigInt(rng, range.
bits() + 2) % range));
SecureVector< byte > random_vec(size_t bytes)
void binary_decode(const byte buf[], size_t length)
std::invalid_argument Invalid_Argument
static BigInt random_integer(RandomNumberGenerator &rng, const BigInt &min, const BigInt &max)
RandomNumberGenerator * rng
void randomize(RandomNumberGenerator &rng, size_t bitsize=0)