8#include <botan/bigint.h>
10#include <botan/assert.h>
11#include <botan/exceptn.h>
13#include <botan/internal/bit_ops.h>
30 array[0] &= 0xFF >> (8 - (bitsize % 8));
35 array[0] |= 0x80 >> ((bitsize % 8) > 0 ? (8 - bitsize % 8) : 0);
38 assign_from_bytes(array);
59 const BigInt diff = max - min;
71 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)
BOTAN_FORCE_INLINE constexpr T ceil_tobytes(T bits)
std::vector< T, secure_allocator< T > > secure_vector