BN_cmp 3 2000-07-16 0.9.9-dev OpenSSL
NAME
BN_cmp, BN_ucmp, BN_is_zero, BN_is_one, BN_is_word, BN_is_odd - BIGNUM comparison and test functions
LIBRARY
libcrypto, -lcrypto
SYNOPSIS
#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);
DESCRIPTION
_B_N___c_m_p_(_) compares the numbers aa and bb. _B_N___u_c_m_p_(_) compares their
absolute values.
_B_N___i_s___z_e_r_o_(_), _B_N___i_s___o_n_e_(_) and _B_N___i_s___w_o_r_d_(_) test if aa equals 0, 1,
or ww respectively. _B_N___i_s___o_d_d_(_) tests if a is odd.
_B_N___i_s___z_e_r_o_(_), _B_N___i_s___o_n_e_(_), _B_N___i_s___w_o_r_d_(_) and _B_N___i_s___o_d_d_(_) are macros.
RETURN VALUES
_B_N___c_m_p_(_) returns -1 if aa < bb, 0 if aa == bb and 1 if
aa > bb. _B_N___u_c_m_p_(_) is the same using the absolute values
of aa and bb.
_B_N___i_s___z_e_r_o_(_), _B_N___i_s___o_n_e_(_) _B_N___i_s___w_o_r_d_(_) and _B_N___i_s___o_d_d_(_) return 1 if
the condition is true, 0 otherwise.
SEE ALSO
_o_p_e_n_s_s_l___b_n(3)
HISTORY
_B_N___c_m_p_(_), _B_N___u_c_m_p_(_), _B_N___i_s___z_e_r_o_(_), _B_N___i_s___o_n_e_(_) and _B_N___i_s___w_o_r_d_(_) are
available in all versions of SSLeay and OpenSSL.
_B_N___i_s___o_d_d_(_) was added in SSLeay 0.8.