1 #include "tommath_private.h"
3 /* LibTomMath, multiple-precision integer library -- Tom St Denis */
4 /* SPDX-License-Identifier: Unlicense */
7 void mp_set(mp_int
*a
, mp_digit b
)
9 a
->dp
[0] = b
& MP_MASK
;
11 a
->used
= (a
->dp
[0] != 0u) ? 1 : 0;
12 MP_ZERO_DIGITS(a
->dp
+ a
->used
, a
->alloc
- a
->used
);