BN_zero.pod 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. =pod
  2. =head1 NAME
  3. BN_zero, BN_one, BN_value_one, BN_set_word, BN_get_word - BIGNUM assignment
  4. operations
  5. =head1 SYNOPSIS
  6. #include <openssl/bn.h>
  7. int BN_zero(BIGNUM *a);
  8. int BN_one(BIGNUM *a);
  9. const BIGNUM *BN_value_one(void);
  10. int BN_set_word(BIGNUM *a, unsigned long w);
  11. unsigned long BN_get_word(BIGNUM *a);
  12. =head1 DESCRIPTION
  13. BN_zero(), BN_one() and BN_set_word() set B<a> to the values 0, 1 and
  14. B<w> respectively. BN_zero() and BN_one() are macros.
  15. BN_value_one() returns a B<BIGNUM> constant of value 1. This constant
  16. is useful for use in comparisons and assignment.
  17. BN_get_word() returns B<a>, if it can be represented as an unsigned
  18. long.
  19. =head1 RETURN VALUES
  20. BN_get_word() returns the value B<a>, and 0xffffffffL if B<a> cannot
  21. be represented as an unsigned long.
  22. BN_zero(), BN_one() and BN_set_word() return 1 on success, 0 otherwise.
  23. BN_value_one() returns the constant.
  24. =head1 BUGS
  25. Someone might change the constant.
  26. If a B<BIGNUM> is equal to 0xffffffffL it can be represented as an
  27. unsigned long but this value is also returned on error.
  28. =head1 SEE ALSO
  29. L<bn(3)|bn(3)>, L<BN_bn2bin(3)|BN_bn2bin(3)>
  30. =head1 HISTORY
  31. BN_zero(), BN_one() and BN_set_word() are available in all versions of
  32. SSLeay and OpenSSL. BN_value_one() and BN_get_word() were added in
  33. SSLeay 0.8.
  34. BN_value_one() was changed to return a true const BIGNUM * in OpenSSL
  35. 0.9.7.
  36. =cut