1BN_zero(3) OpenSSL BN_zero(3)
2
3
4
6 BN_zero, BN_one, BN_value_one, BN_set_word, BN_get_word - BIGNUM
7 assignment operations
8
10 #include <openssl/bn.h>
11
12 int BN_zero(BIGNUM *a);
13 int BN_one(BIGNUM *a);
14
15 const BIGNUM *BN_value_one(void);
16
17 int BN_set_word(BIGNUM *a, unsigned long w);
18 unsigned long BN_get_word(BIGNUM *a);
19
21 BN_zero(), BN_one() and BN_set_word() set a to the values 0, 1 and w
22 respectively. BN_zero() and BN_one() are macros.
23
24 BN_value_one() returns a BIGNUM constant of value 1. This constant is
25 useful for use in comparisons and assignment.
26
27 BN_get_word() returns a, if it can be represented as an unsigned long.
28
30 BN_get_word() returns the value a, and 0xffffffffL if a cannot be
31 represented as an unsigned long.
32
33 BN_zero(), BN_one() and BN_set_word() return 1 on success, 0 otherwise.
34 BN_value_one() returns the constant.
35
37 Someone might change the constant.
38
39 If a BIGNUM is equal to 0xffffffffL it can be represented as an
40 unsigned long but this value is also returned on error.
41
43 bn(3), BN_bn2bin(3)
44
46 BN_zero(), BN_one() and BN_set_word() are available in all versions of
47 SSLeay and OpenSSL. BN_value_one() and BN_get_word() were added in
48 SSLeay 0.8.
49
50 BN_value_one() was changed to return a true const BIGNUM * in OpenSSL
51 0.9.7.
52
53
54
551.0.0e 2002-07-18 BN_zero(3)