BN_zero.pod revision 68651
1214571Sdim=pod 2214571Sdim 3214571Sdim=head1 NAME 4214571Sdim 5214571SdimBN_zero, BN_one, BN_value_one, BN_set_word, BN_get_word - BIGNUM assignment 6214571Sdimoperations 7214571Sdim 8214571Sdim=head1 SYNOPSIS 9214571Sdim 10214571Sdim #include <openssl/bn.h> 11214571Sdim 12214571Sdim int BN_zero(BIGNUM *a); 13214571Sdim int BN_one(BIGNUM *a); 14214571Sdim 15214571Sdim BIGNUM *BN_value_one(void); 16214571Sdim 17214571Sdim int BN_set_word(BIGNUM *a, unsigned long w); 18214571Sdim unsigned long BN_get_word(BIGNUM *a); 19214571Sdim 20214571Sdim=head1 DESCRIPTION 21214571Sdim 22214571SdimBN_zero(), BN_one() and BN_set_word() set B<a> to the values 0, 1 and 23214571SdimB<w> respectively. BN_zero() and BN_one() are macros. 24214571Sdim 25214571SdimBN_value_one() returns a B<BIGNUM> constant of value 1. This constant 26214571Sdimis useful for use in comparisons and assignment. 27214571Sdim 28214571SdimBN_get_word() returns B<a>, if it can be represented as an unsigned 29214571Sdimlong. 30214571Sdim 31214571Sdim=head1 RETURN VALUES 32214571Sdim 33214571SdimBN_get_word() returns the value B<a>, and 0xffffffffL if B<a> cannot 34214571Sdimbe represented as an unsigned long. 35214571Sdim 36214571SdimBN_zero(), BN_one() and BN_set_word() return 1 on success, 0 otherwise. 37214571SdimBN_value_one() returns the constant. 38214571Sdim 39=head1 BUGS 40 41Someone might change the constant. 42 43If a B<BIGNUM> is equal to 0xffffffffL it can be represented as an 44unsigned long but this value is also returned on error. 45 46=head1 SEE ALSO 47 48L<bn(3)|bn(3)>, L<BN_bn2bin(3)|BN_bn2bin(3)> 49 50=head1 HISTORY 51 52BN_zero(), BN_one() and BN_set_word() are available in all versions of 53SSLeay and OpenSSL. BN_value_one() and BN_get_word() were added in 54SSLeay 0.8. 55 56=cut 57