Sortix cisortix manual
This manual documents Sortix cisortix. You can instead view this document in the latest official manual.
NAME
BN_set_bit, BN_clear_bit, BN_is_bit_set, BN_mask_bits, BN_lshift, BN_lshift1, BN_rshift, BN_rshift1 — bit operations on BIGNUMsSYNOPSIS
#include <openssl/bn.h>BN_set_bit(BIGNUM *a, int n);
BN_clear_bit(BIGNUM *a, int n);
BN_is_bit_set(const BIGNUM *a, int n);
BN_mask_bits(BIGNUM *a, int n);
BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
BN_lshift1(BIGNUM *r, const BIGNUM *a);
BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
BN_rshift1(BIGNUM *r, const BIGNUM *a);
DESCRIPTION
BN_set_bit() sets bit n in a to 1 (a|=(1<<n)
). The number is expanded if necessary.a&=~(1<<n)
). An error occurs if a is shorter than n bits.a&=~((~0)>>n)
). An error occurs if a already is shorter than n bits.r=a*2^n
). Note that n must be non-negative. BN_lshift1() shifts a left by one and places the result in r (r=2*a
).r=a/2^n
). Note that n must be non-negative. BN_rshift1() shifts a right by one and places the result in r (r=a/2
).