netbsd man page for bn_cmp

Query: bn_cmp

OS: netbsd

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

BN_cmp(3)							      OpenSSL								 BN_cmp(3)

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 <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);
DESCRIPTION
BN_cmp() compares the numbers a and b. BN_ucmp() compares their absolute values. BN_is_zero(), BN_is_one() and BN_is_word() test if a equals 0, 1, or w respectively. BN_is_odd() tests if a is odd. BN_is_zero(), BN_is_one(), BN_is_word() and BN_is_odd() are macros.
RETURN VALUES
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.
SEE ALSO
openssl_bn(3)
HISTORY
BN_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. 1.0.1i 2009-07-20 BN_cmp(3)
Related Man Pages
bn(3) - osx
bn(3ssl) - netbsd
bn(3ssl) - plan9
bn(3ssl) - mojave
bn(3ssl) - suse
Similar Topics in the Unix Linux Community
Memory Leaks
How to install PGX32 on Sparc 10 Ultra?
Make bold chars in UNIX
Grep command to show the number of results