Lines Matching refs:bn
177 int BN_abs_is_word(const BIGNUM *bn, BN_ULONG w) { in BN_abs_is_word() argument
178 switch (bn->top) { in BN_abs_is_word()
180 return bn->d[0] == w; in BN_abs_is_word()
199 int BN_is_zero(const BIGNUM *bn) { in BN_is_zero() argument
200 return bn->top == 0; in BN_is_zero()
203 int BN_is_one(const BIGNUM *bn) { in BN_is_one() argument
204 return bn->neg == 0 && BN_abs_is_word(bn, 1); in BN_is_one()
207 int BN_is_word(const BIGNUM *bn, BN_ULONG w) { in BN_is_word() argument
208 return BN_abs_is_word(bn, w) && (w == 0 || bn->neg == 0); in BN_is_word()
211 int BN_is_odd(const BIGNUM *bn) { in BN_is_odd() argument
212 return bn->top > 0 && (bn->d[0] & 1) == 1; in BN_is_odd()
215 int BN_is_pow2(const BIGNUM *bn) { in BN_is_pow2() argument
216 if (bn->top == 0 || bn->neg) { in BN_is_pow2()
220 for (int i = 0; i < bn->top - 1; i++) { in BN_is_pow2()
221 if (bn->d[i] != 0) { in BN_is_pow2()
226 return 0 == (bn->d[bn->top-1] & (bn->d[bn->top-1] - 1)); in BN_is_pow2()