5 BN_zero, BN_one, BN_value_one, BN_set_word, BN_get_word - BIGNUM assignment
10 #include <openssl/bn.h>
12 void BN_zero(BIGNUM *a);
13 int BN_one(BIGNUM *a);
15 const BIGNUM *BN_value_one(void);
17 int BN_set_word(BIGNUM *a, BN_ULONG w);
18 BN_ULONG BN_get_word(BIGNUM *a);
22 #if OPENSSL_API_COMPAT < 0x00908000L
23 int BN_zero(BIGNUM *a);
28 B<BN_ULONG> is a macro that will be an unsigned integral type optimied
29 for the most efficient implementation on the local platform.
31 BN_zero(), BN_one() and BN_set_word() set B<a> to the values 0, 1 and
32 B<w> respectively. BN_zero() and BN_one() are macros.
34 BN_value_one() returns a B<BIGNUM> constant of value 1. This constant
35 is useful for use in comparisons and assignment.
37 BN_get_word() returns B<a>, if it can be represented as a B<BN_ULONG>.
41 BN_get_word() returns the value B<a>, or all-bits-set if B<a> cannot
42 be represented as a B<BN_ULONG>.
44 BN_one(), BN_set_word() and the deprecated version of BN_zero()
45 return 1 on success, 0 otherwise.
46 BN_value_one() returns the constant.
47 The preferred version of BN_zero() never fails and returns no value.
51 If a B<BIGNUM> is equal to the value of all-bits-set, it will collide
52 with the error condition returned by BN_get_word() which uses that
55 B<BN_ULONG> should probably be a typedef.
63 Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
65 Licensed under the OpenSSL license (the "License"). You may not use
66 this file except in compliance with the License. You can obtain a copy
67 in the file LICENSE in the source distribution or at
68 L<https://www.openssl.org/source/license.html>.