8#include <botan/bigint.h>
10#include <botan/internal/rounding.h>
18 size_t bitsize,
bool set_high_bit)
32 array[0] &= 0xFF >> (8 - (bitsize % 8));
36 array[0] |= 0x80 >> ((bitsize % 8) ? (8 - bitsize % 8) : 0);
59 while(r < min || r >= max);
void binary_decode(const uint8_t buf[], size_t length)
static BigInt random_integer(RandomNumberGenerator &rng, const BigInt &min, const BigInt &max)
void randomize(RandomNumberGenerator &rng, size_t bitsize, bool set_high_bit=true)
secure_vector< uint8_t > random_vec(size_t bytes)
std::vector< T, secure_allocator< T > > secure_vector
size_t round_up(size_t n, size_t align_to)