8#include <botan/bigint.h>
10#include <botan/exceptn.h>
12#include <botan/internal/rounding.h>
29 array[0] &= 0xFF >> (8 - (bitsize % 8));
34 array[0] |= 0x80 >> ((bitsize % 8) > 0 ? (8 - bitsize % 8) : 0);
37 assign_from_bytes(array);
58 const BigInt diff = max - min;
70 if(r >= min && r < max) {
#define BOTAN_DEBUG_ASSERT(expr)
static BigInt random_integer(RandomNumberGenerator &rng, const BigInt &min, const BigInt &max)
void randomize(RandomNumberGenerator &rng, size_t bitsize, bool set_high_bit=true)
void random_vec(std::span< uint8_t > v)
constexpr size_t round_up(size_t n, size_t align_to)
std::vector< T, secure_allocator< T > > secure_vector