=pod =head1 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 BIGNUMs =head1 SYNOPSIS #include int BN_set_bit(BIGNUM *a, int n); int BN_clear_bit(BIGNUM *a, int n); int BN_is_bit_set(const BIGNUM *a, int n); int BN_mask_bits(BIGNUM *a, int n); int BN_lshift(BIGNUM *r, const BIGNUM *a, int n); int BN_lshift1(BIGNUM *r, BIGNUM *a); int BN_rshift(BIGNUM *r, BIGNUM *a, int n); int BN_rshift1(BIGNUM *r, BIGNUM *a); =head1 DESCRIPTION BN_set_bit() sets bit B in B to 1 (CEn)>). The number is expanded if necessary. BN_clear_bit() sets bit B in B to 0 (CEn)>). An error occurs if B is shorter than B bits. BN_is_bit_set() tests if bit B in B is set. BN_mask_bits() truncates B to an B bit number (CEn)>). An error occurs if B already is shorter than B bits. BN_lshift() shifts B left by B bits and places the result in B (C). Note that B must be non-negative. BN_lshift1() shifts B left by one and places the result in B (C). BN_rshift() shifts B right by B bits and places the result in B (C). Note that B must be non-negative. BN_rshift1() shifts B right by one and places the result in B (C). For the shift functions, B and B may be the same variable. =head1 RETURN VALUES BN_is_bit_set() returns 1 if the bit is set, 0 otherwise. All other functions return 1 for success, 0 on error. The error codes can be obtained by L. =head1 SEE ALSO L, L =head1 COPYRIGHT Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at L. =cut