1BN_CMP(3)                           OpenSSL                          BN_CMP(3)
2
3
4

NAME

6       BN_cmp, BN_ucmp, BN_is_zero, BN_is_one, BN_is_word, BN_is_odd - BIGNUM
7       comparison and test functions
8

SYNOPSIS

10        #include <openssl/bn.h>
11
12        int BN_cmp(BIGNUM *a, BIGNUM *b);
13        int BN_ucmp(BIGNUM *a, BIGNUM *b);
14
15        int BN_is_zero(BIGNUM *a);
16        int BN_is_one(BIGNUM *a);
17        int BN_is_word(BIGNUM *a, BN_ULONG w);
18        int BN_is_odd(BIGNUM *a);
19

DESCRIPTION

21       BN_cmp() compares the numbers a and b. BN_ucmp() compares their
22       absolute values.
23
24       BN_is_zero(), BN_is_one() and BN_is_word() test if a equals 0, 1, or w
25       respectively. BN_is_odd() tests if a is odd.
26
27       BN_is_zero(), BN_is_one(), BN_is_word() and BN_is_odd() are macros.
28

RETURN VALUES

30       BN_cmp() returns -1 if a < b, 0 if a == b and 1 if a > b. BN_ucmp() is
31       the same using the absolute values of a and b.
32
33       BN_is_zero(), BN_is_one() BN_is_word() and BN_is_odd() return 1 if the
34       condition is true, 0 otherwise.
35
37       Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
38
39       Licensed under the OpenSSL license (the "License").  You may not use
40       this file except in compliance with the License.  You can obtain a copy
41       in the file LICENSE in the source distribution or at
42       <https://www.openssl.org/source/license.html>.
43
44
45
461.1.1d                            2019-10-03                         BN_CMP(3)
Impressum