Botan 3.0.0
Crypto and TLS for C&
Functions
ffi_mp.cpp File Reference
#include <botan/ffi.h>
#include <botan/internal/ffi_util.h>
#include <botan/internal/ffi_rng.h>
#include <botan/internal/ffi_mp.h>
#include <botan/reducer.h>
#include <botan/numthry.h>
#include <botan/internal/divide.h>

Go to the source code of this file.

Functions

int botan_mp_add (botan_mp_t result, const botan_mp_t x, const botan_mp_t y)
 
int botan_mp_add_u32 (botan_mp_t result, const botan_mp_t x, uint32_t y)
 
int botan_mp_clear (botan_mp_t mp)
 
int botan_mp_clear_bit (botan_mp_t mp, size_t bit)
 
int botan_mp_cmp (int *result, const botan_mp_t x_w, const botan_mp_t y_w)
 
int botan_mp_destroy (botan_mp_t mp)
 
int botan_mp_div (botan_mp_t quotient, botan_mp_t remainder, const botan_mp_t x, const botan_mp_t y)
 
int botan_mp_equal (const botan_mp_t x_w, const botan_mp_t y_w)
 
int botan_mp_flip_sign (botan_mp_t mp)
 
int botan_mp_from_bin (botan_mp_t mp, const uint8_t bin[], size_t bin_len)
 
int botan_mp_gcd (botan_mp_t out, const botan_mp_t x, const botan_mp_t y)
 
int botan_mp_get_bit (const botan_mp_t mp, size_t bit)
 
int botan_mp_init (botan_mp_t *mp_out)
 
int botan_mp_is_even (const botan_mp_t mp)
 
int botan_mp_is_negative (const botan_mp_t mp)
 
int botan_mp_is_odd (const botan_mp_t mp)
 
int botan_mp_is_positive (const botan_mp_t mp)
 
int botan_mp_is_prime (const botan_mp_t mp, botan_rng_t rng, size_t test_prob)
 
int botan_mp_is_zero (const botan_mp_t mp)
 
int botan_mp_lshift (botan_mp_t out, const botan_mp_t in, size_t shift)
 
int botan_mp_mod_inverse (botan_mp_t out, const botan_mp_t in, const botan_mp_t modulus)
 
int botan_mp_mod_mul (botan_mp_t out, const botan_mp_t x, const botan_mp_t y, const botan_mp_t modulus)
 
int botan_mp_mul (botan_mp_t result, const botan_mp_t x, const botan_mp_t y)
 
int botan_mp_num_bits (const botan_mp_t mp, size_t *bits)
 
int botan_mp_num_bytes (const botan_mp_t mp, size_t *bytes)
 
int botan_mp_powmod (botan_mp_t out, const botan_mp_t base, const botan_mp_t exponent, const botan_mp_t modulus)
 
int botan_mp_rand_bits (botan_mp_t rand_out, botan_rng_t rng, size_t bits)
 
int botan_mp_rand_range (botan_mp_t rand_out, botan_rng_t rng, const botan_mp_t lower, const botan_mp_t upper)
 
int botan_mp_rshift (botan_mp_t out, const botan_mp_t in, size_t shift)
 
int botan_mp_set_bit (botan_mp_t mp, size_t bit)
 
int botan_mp_set_from_int (botan_mp_t mp, int initial_value)
 
int botan_mp_set_from_mp (botan_mp_t dest, const botan_mp_t source)
 
int botan_mp_set_from_radix_str (botan_mp_t mp, const char *str, size_t radix)
 
int botan_mp_set_from_str (botan_mp_t mp, const char *str)
 
int botan_mp_sub (botan_mp_t result, const botan_mp_t x, const botan_mp_t y)
 
int botan_mp_sub_u32 (botan_mp_t result, const botan_mp_t x, uint32_t y)
 
int botan_mp_swap (botan_mp_t x_w, botan_mp_t y_w)
 
int botan_mp_to_bin (const botan_mp_t mp, uint8_t vec[])
 
int botan_mp_to_hex (const botan_mp_t mp, char *out)
 
int botan_mp_to_str (const botan_mp_t mp, uint8_t digit_base, char *out, size_t *out_len)
 
int botan_mp_to_uint32 (const botan_mp_t mp, uint32_t *val)
 

Function Documentation

◆ botan_mp_add()

int botan_mp_add ( botan_mp_t  result,
const botan_mp_t  x,
const botan_mp_t  y 
)

Definition at line 132 of file ffi_mp.cpp.

133 {
134 return BOTAN_FFI_VISIT(result, [=](auto& res) {
135 if(result == x)
136 res += safe_get(y);
137 else
138 res = safe_get(x) + safe_get(y);
139 });
140 }
static SIMD_4x64 y
#define BOTAN_FFI_VISIT(obj, lambda)
Definition: ffi_util.h:126
T & safe_get(botan_struct< T, M > *p)
Definition: ffi_util.h:69

References BOTAN_FFI_VISIT, Botan_FFI::safe_get(), and y.

◆ botan_mp_add_u32()

int botan_mp_add_u32 ( botan_mp_t  result,
const botan_mp_t  x,
uint32_t  y 
)

Definition at line 152 of file ffi_mp.cpp.

153 {
154 return BOTAN_FFI_VISIT(result, [=](auto& res) {
155 if(result == x)
156 res += static_cast<Botan::word>(y);
157 else
158 res = safe_get(x) + static_cast<Botan::word>(y);
159 });
160 }

References BOTAN_FFI_VISIT, Botan_FFI::safe_get(), and y.

◆ botan_mp_clear()

int botan_mp_clear ( botan_mp_t  mp)

Set the MPI to zero

Definition at line 32 of file ffi_mp.cpp.

33 {
34 return BOTAN_FFI_VISIT(mp, [](auto& bn) { bn.clear(); });
35 }

References BOTAN_FFI_VISIT.

◆ botan_mp_clear_bit()

int botan_mp_clear_bit ( botan_mp_t  n,
size_t  bit 
)

Clear the specified bit

Definition at line 290 of file ffi_mp.cpp.

291 {
292 return BOTAN_FFI_VISIT(mp, [=](auto& n) { n.clear_bit(bit); });
293 }

References BOTAN_FFI_VISIT.

◆ botan_mp_cmp()

int botan_mp_cmp ( int *  result,
const botan_mp_t  x_w,
const botan_mp_t  y_w 
)

Definition at line 213 of file ffi_mp.cpp.

214 {
215 return BOTAN_FFI_VISIT(x_w, [=](auto& x) { *result = x.cmp(safe_get(y_w)); });
216 }

References BOTAN_FFI_VISIT, and Botan_FFI::safe_get().

◆ botan_mp_destroy()

int botan_mp_destroy ( botan_mp_t  mp)

Destroy (deallocate) an MPI

Returns
0 if success, error if invalid object handle

Definition at line 127 of file ffi_mp.cpp.

128 {
129 return BOTAN_FFI_CHECKED_DELETE(mp);
130 }
#define BOTAN_FFI_CHECKED_DELETE(o)
Definition: ffi_util.h:145

References BOTAN_FFI_CHECKED_DELETE.

◆ botan_mp_div()

int botan_mp_div ( botan_mp_t  quotient,
botan_mp_t  remainder,
const botan_mp_t  x,
const botan_mp_t  y 
)

Definition at line 182 of file ffi_mp.cpp.

185 {
186 return BOTAN_FFI_VISIT(quotient, [=](auto& q) {
189 safe_get(remainder) = r;
190 });
191 }
void vartime_divide(const BigInt &x, const BigInt &y_arg, BigInt &q_out, BigInt &r_out)
Definition: divide.cpp:165

References BOTAN_FFI_VISIT, Botan_FFI::safe_get(), Botan::vartime_divide(), and y.

◆ botan_mp_equal()

int botan_mp_equal ( const botan_mp_t  x_w,
const botan_mp_t  y_w 
)

Definition at line 193 of file ffi_mp.cpp.

194 {
195 return BOTAN_FFI_VISIT(x_w, [=](const auto& x) -> int { return x == safe_get(y_w); });
196 }

References BOTAN_FFI_VISIT, and Botan_FFI::safe_get().

◆ botan_mp_flip_sign()

int botan_mp_flip_sign ( botan_mp_t  mp)

Definition at line 83 of file ffi_mp.cpp.

84 {
85 return BOTAN_FFI_VISIT(mp, [](auto& bn) { bn.flip_sign(); });
86 }

References BOTAN_FFI_VISIT.

◆ botan_mp_from_bin()

int botan_mp_from_bin ( botan_mp_t  mp,
const uint8_t  bin[],
size_t  bin_len 
)

Definition at line 88 of file ffi_mp.cpp.

89 {
90 return BOTAN_FFI_VISIT(mp, [=](auto& bn) { bn.binary_decode(bin, bin_len); });
91 }

References BOTAN_FFI_VISIT.

◆ botan_mp_gcd()

int botan_mp_gcd ( botan_mp_t  out,
const botan_mp_t  x,
const botan_mp_t  y 
)

Definition at line 268 of file ffi_mp.cpp.

269 {
270 return BOTAN_FFI_VISIT(out, [=] (auto& o) {
271 o = Botan::gcd(safe_get(x), safe_get(y)); });
272 }
BigInt gcd(const BigInt &a, const BigInt &b)
Definition: numthry.cpp:220

References BOTAN_FFI_VISIT, Botan::gcd(), Botan_FFI::safe_get(), and y.

◆ botan_mp_get_bit()

int botan_mp_get_bit ( const botan_mp_t  n,
size_t  bit 
)

Returns 0 if specified bit of n is not set Returns 1 if specified bit of n is set Returns negative number on error

Definition at line 280 of file ffi_mp.cpp.

281 {
282 return BOTAN_FFI_VISIT(mp, [=](const auto& n) -> int { return n.get_bit(bit); });
283 }

References BOTAN_FFI_VISIT.

◆ botan_mp_init()

int botan_mp_init ( botan_mp_t mp)

Initialize an MPI

Definition at line 20 of file ffi_mp.cpp.

21 {
22 return ffi_guard_thunk(__func__, [=]() -> int {
23 if(mp_out == nullptr)
25
26 auto mp = std::make_unique<Botan::BigInt>();
27 *mp_out = new botan_mp_struct(std::move(mp));
28 return BOTAN_FFI_SUCCESS;
29 });
30 }
@ BOTAN_FFI_ERROR_NULL_POINTER
Definition: ffi.h:85
@ BOTAN_FFI_SUCCESS
Definition: ffi.h:70
int ffi_guard_thunk(const char *func_name, const std::function< int()> &thunk)
Definition: ffi.cpp:120

References BOTAN_FFI_ERROR_NULL_POINTER, BOTAN_FFI_SUCCESS, and Botan_FFI::ffi_guard_thunk().

◆ botan_mp_is_even()

int botan_mp_is_even ( const botan_mp_t  mp)

Definition at line 208 of file ffi_mp.cpp.

209 {
210 return BOTAN_FFI_VISIT(mp, [](const auto& bn) -> int { return bn.is_even(); });
211 }

References BOTAN_FFI_VISIT.

◆ botan_mp_is_negative()

int botan_mp_is_negative ( const botan_mp_t  mp)

Return 1 iff mp is less than 0

Definition at line 73 of file ffi_mp.cpp.

74 {
75 return BOTAN_FFI_VISIT(mp, [](const auto& bn) { return bn.is_negative() ? 1 : 0; });
76 }

References BOTAN_FFI_VISIT.

◆ botan_mp_is_odd()

int botan_mp_is_odd ( const botan_mp_t  mp)

Definition at line 203 of file ffi_mp.cpp.

204 {
205 return BOTAN_FFI_VISIT(mp, [](const auto& bn) -> int { return bn.is_odd(); });
206 }

References BOTAN_FFI_VISIT.

◆ botan_mp_is_positive()

int botan_mp_is_positive ( const botan_mp_t  mp)

This function should have been named mp_is_non_negative. Returns 1 iff mp is greater than or equal to zero. Use botan_mp_is_negative to detect negative numbers, botan_mp_is_zero to check for zero.

Definition at line 78 of file ffi_mp.cpp.

79 {
80 return BOTAN_FFI_VISIT(mp, [](const auto& bn) { return bn.is_positive() ? 1 : 0; });
81 }

References BOTAN_FFI_VISIT.

◆ botan_mp_is_prime()

int botan_mp_is_prime ( const botan_mp_t  n,
botan_rng_t  rng,
size_t  test_prob 
)

Returns 0 if n is not prime Returns 1 if n is prime Returns negative number on error

Definition at line 274 of file ffi_mp.cpp.

275 {
276 return BOTAN_FFI_VISIT(mp, [=](const auto& n)
277 { return (Botan::is_prime(n, safe_get(rng), test_prob)) ? 1 : 0; });
278 }
bool is_prime(const BigInt &n, RandomNumberGenerator &rng, size_t prob, bool is_random)
Definition: numthry.cpp:370

References BOTAN_FFI_VISIT, Botan::is_prime(), and Botan_FFI::safe_get().

◆ botan_mp_is_zero()

int botan_mp_is_zero ( const botan_mp_t  mp)

Definition at line 198 of file ffi_mp.cpp.

199 {
200 return BOTAN_FFI_VISIT(mp, [](const auto& bn) -> int { return bn.is_zero(); });
201 }

References BOTAN_FFI_VISIT.

◆ botan_mp_lshift()

int botan_mp_lshift ( botan_mp_t  out,
const botan_mp_t  in,
size_t  shift 
)

Definition at line 230 of file ffi_mp.cpp.

231 {
232 return BOTAN_FFI_VISIT(out, [=](auto& o) { o = safe_get(in) << shift; });
233 }

References BOTAN_FFI_VISIT, and Botan_FFI::safe_get().

◆ botan_mp_mod_inverse()

int botan_mp_mod_inverse ( botan_mp_t  out,
const botan_mp_t  in,
const botan_mp_t  modulus 
)

Definition at line 240 of file ffi_mp.cpp.

241 {
242 return BOTAN_FFI_VISIT(out, [=](auto& o) { o = Botan::inverse_mod(safe_get(in), safe_get(modulus)); });
243 }
BigInt inverse_mod(const BigInt &n, const BigInt &mod)
Definition: mod_inv.cpp:177

References BOTAN_FFI_VISIT, Botan::inverse_mod(), and Botan_FFI::safe_get().

◆ botan_mp_mod_mul()

int botan_mp_mod_mul ( botan_mp_t  out,
const botan_mp_t  x,
const botan_mp_t  y,
const botan_mp_t  modulus 
)

Definition at line 245 of file ffi_mp.cpp.

246 {
247 return BOTAN_FFI_VISIT(out, [=](auto& o) {
248 Botan::Modular_Reducer reducer(safe_get(modulus));
249 o = reducer.multiply(safe_get(x), safe_get(y));
250 });
251 }

References BOTAN_FFI_VISIT, Botan::Modular_Reducer::multiply(), Botan_FFI::safe_get(), and y.

◆ botan_mp_mul()

int botan_mp_mul ( botan_mp_t  result,
const botan_mp_t  x,
const botan_mp_t  y 
)

Definition at line 172 of file ffi_mp.cpp.

173 {
174 return BOTAN_FFI_VISIT(result, [=](auto& res) {
175 if(result == x)
176 res *= safe_get(y);
177 else
178 res = safe_get(x) * safe_get(y);
179 });
180 }

References BOTAN_FFI_VISIT, Botan_FFI::safe_get(), and y.

◆ botan_mp_num_bits()

int botan_mp_num_bits ( const botan_mp_t  n,
size_t *  bits 
)

Return the number of significant bits in the MPI

Definition at line 295 of file ffi_mp.cpp.

296 {
297 return BOTAN_FFI_VISIT(mp, [=](const auto& n) { *bits = n.bits(); });
298 }

References BOTAN_FFI_VISIT.

◆ botan_mp_num_bytes()

int botan_mp_num_bytes ( const botan_mp_t  n,
size_t *  bytes 
)

Return the number of significant bytes in the MPI

Definition at line 300 of file ffi_mp.cpp.

301 {
302 return BOTAN_FFI_VISIT(mp, [=](const auto& n) { *bytes = n.bytes(); });
303 }

References BOTAN_FFI_VISIT.

◆ botan_mp_powmod()

int botan_mp_powmod ( botan_mp_t  out,
const botan_mp_t  base,
const botan_mp_t  exponent,
const botan_mp_t  modulus 
)

Definition at line 224 of file ffi_mp.cpp.

225 {
226 return BOTAN_FFI_VISIT(out, [=](auto& o)
227 { o = Botan::power_mod(safe_get(base), safe_get(exponent), safe_get(modulus)); });
228 }
BigInt power_mod(const BigInt &base, const BigInt &exp, const BigInt &mod)
Definition: numthry.cpp:296

References BOTAN_FFI_VISIT, Botan::power_mod(), and Botan_FFI::safe_get().

◆ botan_mp_rand_bits()

int botan_mp_rand_bits ( botan_mp_t  rand_out,
botan_rng_t  rng,
size_t  bits 
)

Definition at line 253 of file ffi_mp.cpp.

254 {
255 return BOTAN_FFI_VISIT(rng, [=] (auto& r) {
256 safe_get(rand_out).randomize(r, bits); });
257 }

References BOTAN_FFI_VISIT, and Botan_FFI::safe_get().

◆ botan_mp_rand_range()

int botan_mp_rand_range ( botan_mp_t  rand_out,
botan_rng_t  rng,
const botan_mp_t  lower,
const botan_mp_t  upper 
)

Definition at line 259 of file ffi_mp.cpp.

263 {
264 return BOTAN_FFI_VISIT(rng, [=] (auto& r) {
265 safe_get(rand_out) = Botan::BigInt::random_integer(r, safe_get(lower), safe_get(upper)); });
266 }
static BigInt random_integer(RandomNumberGenerator &rng, const BigInt &min, const BigInt &max)
Definition: big_rand.cpp:45

References BOTAN_FFI_VISIT, Botan::BigInt::random_integer(), and Botan_FFI::safe_get().

◆ botan_mp_rshift()

int botan_mp_rshift ( botan_mp_t  out,
const botan_mp_t  in,
size_t  shift 
)

Definition at line 235 of file ffi_mp.cpp.

236 {
237 return BOTAN_FFI_VISIT(out, [=](auto& o) { o = safe_get(in) >> shift; });
238 }

References BOTAN_FFI_VISIT, and Botan_FFI::safe_get().

◆ botan_mp_set_bit()

int botan_mp_set_bit ( botan_mp_t  n,
size_t  bit 
)

Set the specified bit

Definition at line 285 of file ffi_mp.cpp.

286 {
287 return BOTAN_FFI_VISIT(mp, [=](auto& n) { n.set_bit(bit); });
288 }

References BOTAN_FFI_VISIT.

◆ botan_mp_set_from_int()

int botan_mp_set_from_int ( botan_mp_t  mp,
int  initial_value 
)

Set the MPI value from an int

Definition at line 37 of file ffi_mp.cpp.

38 {
39 return BOTAN_FFI_VISIT(mp, [=](auto& bn) {
40 bn = Botan::BigInt::from_s32(initial_value);
41 });
42 }
static BigInt from_s32(int32_t n)
Definition: bigint.cpp:51

References BOTAN_FFI_VISIT, and Botan::BigInt::from_s32().

◆ botan_mp_set_from_mp()

int botan_mp_set_from_mp ( botan_mp_t  dest,
const botan_mp_t  source 
)

Set the MPI value from another MP object

Definition at line 68 of file ffi_mp.cpp.

69 {
70 return BOTAN_FFI_VISIT(dest, [=](auto& bn) { bn = safe_get(source); });
71 }

References BOTAN_FFI_VISIT, and Botan_FFI::safe_get().

◆ botan_mp_set_from_radix_str()

int botan_mp_set_from_radix_str ( botan_mp_t  dest,
const char *  str,
size_t  radix 
)

Set the MPI value from a string with arbitrary radix. For arbitrary being 10 or 16.

Definition at line 49 of file ffi_mp.cpp.

50 {
51 return BOTAN_FFI_VISIT(mp, [=](auto& bn) {
53 if(radix == 10)
55 else if(radix == 16)
57 else
59
60 const uint8_t* bytes = Botan::cast_char_ptr_to_uint8(str);
61 const size_t len = strlen(str);
62
63 bn = Botan::BigInt(bytes, len, base);
64 return BOTAN_FFI_SUCCESS;
65 });
66 }
@ Hexadecimal
Definition: bigint.h:30
@ BOTAN_FFI_ERROR_NOT_IMPLEMENTED
Definition: ffi.h:91
const uint8_t * cast_char_ptr_to_uint8(const char *s)
Definition: mem_ops.h:183

References BOTAN_FFI_ERROR_NOT_IMPLEMENTED, BOTAN_FFI_SUCCESS, BOTAN_FFI_VISIT, Botan::cast_char_ptr_to_uint8(), Botan::BigInt::Decimal, and Botan::BigInt::Hexadecimal.

◆ botan_mp_set_from_str()

int botan_mp_set_from_str ( botan_mp_t  dest,
const char *  str 
)

Set the MPI value from a string

Definition at line 44 of file ffi_mp.cpp.

45 {
46 return BOTAN_FFI_VISIT(mp, [=](auto& bn) { bn = Botan::BigInt(str); });
47 }

References BOTAN_FFI_VISIT.

◆ botan_mp_sub()

int botan_mp_sub ( botan_mp_t  result,
const botan_mp_t  x,
const botan_mp_t  y 
)

Definition at line 142 of file ffi_mp.cpp.

143 {
144 return BOTAN_FFI_VISIT(result, [=](auto& res) {
145 if(result == x)
146 res -= safe_get(y);
147 else
148 res = safe_get(x) - safe_get(y);
149 });
150 }

References BOTAN_FFI_VISIT, Botan_FFI::safe_get(), and y.

◆ botan_mp_sub_u32()

int botan_mp_sub_u32 ( botan_mp_t  result,
const botan_mp_t  x,
uint32_t  y 
)

Definition at line 162 of file ffi_mp.cpp.

163 {
164 return BOTAN_FFI_VISIT(result, [=](auto& res) {
165 if(result == x)
166 res -= static_cast<Botan::word>(y);
167 else
168 res = safe_get(x) - static_cast<Botan::word>(y);
169 });
170 }

References BOTAN_FFI_VISIT, Botan_FFI::safe_get(), and y.

◆ botan_mp_swap()

int botan_mp_swap ( botan_mp_t  x_w,
botan_mp_t  y_w 
)

Definition at line 218 of file ffi_mp.cpp.

219 {
220 return BOTAN_FFI_VISIT(x_w, [=](auto& x) { x.swap(safe_get(y_w)); });
221 }

References BOTAN_FFI_VISIT, and Botan_FFI::safe_get().

◆ botan_mp_to_bin()

int botan_mp_to_bin ( const botan_mp_t  mp,
uint8_t  vec[] 
)

Definition at line 113 of file ffi_mp.cpp.

114 {
115 return BOTAN_FFI_VISIT(mp, [=](const auto &bn) { bn.binary_encode(vec); });
116 }

References BOTAN_FFI_VISIT.

◆ botan_mp_to_hex()

int botan_mp_to_hex ( const botan_mp_t  mp,
char *  out 
)

Convert the MPI to a hex string. Writes botan_mp_num_bytes(mp)*2 + 1 bytes

Definition at line 93 of file ffi_mp.cpp.

94 {
95 return BOTAN_FFI_VISIT(mp, [=](const auto &bn) {
96 const std::string hex = bn.to_hex_string();
97 std::memcpy(out, hex.c_str(), 1 + hex.size());
98 });
99 }

References BOTAN_FFI_VISIT.

◆ botan_mp_to_str()

int botan_mp_to_str ( const botan_mp_t  mp,
uint8_t  base,
char *  out,
size_t *  out_len 
)

Convert the MPI to a string. Currently base == 10 and base == 16 are supported.

Definition at line 101 of file ffi_mp.cpp.

102 {
103 return BOTAN_FFI_VISIT(mp, [=](const auto &bn) -> int {
104 if(digit_base == 0 || digit_base == 10)
105 return write_str_output(out, out_len, bn.to_dec_string());
106 else if(digit_base == 16)
107 return write_str_output(out, out_len, bn.to_hex_string());
108 else
110 });
111 }
@ BOTAN_FFI_ERROR_BAD_PARAMETER
Definition: ffi.h:86
int write_str_output(uint8_t out[], size_t *out_len, std::string_view str)
Definition: ffi_util.h:219

References BOTAN_FFI_ERROR_BAD_PARAMETER, BOTAN_FFI_VISIT, and Botan_FFI::write_str_output().

◆ botan_mp_to_uint32()

int botan_mp_to_uint32 ( const botan_mp_t  mp,
uint32_t *  val 
)

Definition at line 118 of file ffi_mp.cpp.

119 {
120 if(val == nullptr)
121 {
123 }
124 return BOTAN_FFI_VISIT(mp, [=](const auto &bn) { *val = bn.to_u32bit(); });
125 }

References BOTAN_FFI_ERROR_NULL_POINTER, and BOTAN_FFI_VISIT.