libressl-BN_zero3
Bignum assignment operations
Usage
Crypto Library (libcrypto, -lcrypto)
#include <openssl/bn.h>
void
BN_zero(BIGNUM *a);
int
BN_one(BIGNUM *a);
const BIGNUM *
BN_value_one(void);
int
BN_set_word(BIGNUM *a, BN_ULONG w);
BN_ULONG
BN_get_word(const BIGNUM *a);
Overview
BN_ULONG is a macro that expands to an unsigned integral type optimized for the most efficient implementation on the local platform. It is unsigned long (= uint64_t) on _LP64 platforms and unsigned int (= uint32_t) elsewhere.
BN_zero(), BN_one(), and BN_set_word() set a to the values 0, 1 and w respectively.
BN_value_one() returns a BIGNUM constant of value 1. This constant is useful for comparisons and assignments.
Return values
BN_get_word() returns the value a, or (BN_ULONG)-1 if a cannot be represented as a BN_ULONG.
BN_one() and BN_set_word() return 1 on success, 0 otherwise. BN_value_one() returns the constant.