Manual Pages for UNIX Darwin command on man BN_mask_bits
MyWebUniversity

Manual Pages for UNIX Darwin command on man BN_mask_bits

BNsetbit(3) OpenSSL BNsetbit(3)

NAME

BNsetbit, BNclearbit, BNisbitset, BNmaskbits, BNlshift,

BNlshift1, BNrshift, BNrshift1 - bit operations on BIGNUMs

SYNOPSIS

#include

int BNsetbit(BIGNUM *a, int n); int BNclearbit(BIGNUM *a, int n); int BNisbitset(const BIGNUM *a, int n); int BNmaskbits(BIGNUM *a, int n); int BNlshift(BIGNUM *r, const BIGNUM *a, int n); int BNlshift1(BIGNUM *r, BIGNUM *a); int BNrshift(BIGNUM *r, BIGNUM *a, int n); int BNrshift1(BIGNUM *r, BIGNUM *a);

DESCRIPTION

BNsetbit() sets bit nn in aa to 1 ("a|=(1<>n)"). An error occurs if aa already is shorter than nn bits. BNlshift() shifts aa left by nn bits and places the result in rr ("r=a*2^n"). BNlshift1() shifts aa left by one and places the result in rr ("r=2*a"). BNrshift() shifts aa right by nn bits and places the result in rr ("r=a/2^n"). BNrshift1() shifts aa right by one and places the result in rr ("r=a/2"). For the shift functions, rr and aa may be the same variable.

RETURN VALUES

BNisbitset() 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 ERRgeterror(3).

SEE ALSO

bn(3), BNnumbytes(3), BNadd(3) HISTORY BNsetbit(), BNclearbit(), BNisbitset(), BNmaskbits(), BNlshift(), BNlshift1(), BNrshift(), and BNrshift1() are available in all versions of SSLeay and OpenSSL.

0.9.7l 2000-02-24 BNsetbit(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™