OpenSSL BN_cmp(3openssl)
NNNNAAAAMMMMEEEEBN_cmp, BN_ucmp, BN_is_zero, BN_is_one, BN_is_word,
BN_is_odd - BIGNUM comparison and test functions
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS#include
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);
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNBN_cmp() compares the numbers aaaa and bbbb. BN_ucmp() compares
their absolute values.BN_is_zero(), BN_is_one() and BN_is_word() test if aaaa equals
0, 1, or wwww respectively. BN_is_odd() tests if a is odd.
BN_is_zero(), BN_is_one(), BN_is_word() and BN_is_odd() are
macros. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSSBN_cmp() returns -1 if aaaa < bbbb, 0 if aaaa == bbbb and 1 if aaaa > bbbb.
BN_ucmp() is the same using the absolute values of aaaa and bbbb.
BN_is_zero(), BN_is_one() BN_is_word() and BN_is_odd()
return 1 if the condition is true, 0 otherwise. SSSSEEEEEEEE AAAALLLLSSSSOOOO bn(3) HHHHIIIISSSSTTTTOOOORRRRYYYYBN_cmp(), BN_ucmp(), BN_is_zero(), BN_is_one() and
BN_is_word() are available in all versions of SSLeay and
OpenSSL. BN_is_odd() was added in SSLeay 0.8.
26/Jan/2000 Last change: 0.9.8o 1