OpenBSD manual page server

Manual Page Search Parameters

BN_CMP(3) Library Functions Manual BN_CMP(3)

BN_cmp, BN_ucmp, BN_is_zero, BN_is_one, BN_is_word, BN_is_oddBIGNUM comparison and test functions

#include <openssl/bn.h>

int
BN_cmp(BIGNUM *a, BIGNUM *b);

int
BN_ucmp(BIGNUM *a, BIGNUM *b);

int
BN_is_zero(BIGNUM *a);

int
BN_is_one(BIGNUM *a);

int
BN_is_word(BIGNUM *a, BN_ULONG w);

int
BN_is_odd(BIGNUM *a);

() compares the numbers a and b. () compares their absolute values.

(), () and () test if a equals 0, 1, or w respectively. () tests if a is odd.

(), (), (), and () are macros.

BN_cmp() returns -1 if a<b, 0 if a==b, and 1 if a>b. BN_ucmp() is the same using the absolute values of a and b.

BN_is_zero(), BN_is_one(), BN_is_word(), and BN_is_odd() return 1 if the condition is true, 0 otherwise.

BN_new(3)

BN_cmp(), BN_ucmp(), BN_is_zero(), BN_is_one(), and BN_is_word() first appeared in SSLeay 0.5.1. BN_is_odd() first appeared in SSLeay 0.8.0. All these functions have been available since OpenBSD 2.4.

March 27, 2018 OpenBSD-6.4