2
0

BN_cmp.pod 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. =pod
  2. =head1 NAME
  3. BN_cmp, BN_ucmp, BN_is_zero, BN_is_one, BN_is_word, BN_is_odd - BIGNUM comparison and test functions
  4. =head1 SYNOPSIS
  5. #include <openssl/bn.h>
  6. int BN_cmp(BIGNUM *a, BIGNUM *b);
  7. int BN_ucmp(BIGNUM *a, BIGNUM *b);
  8. int BN_is_zero(BIGNUM *a);
  9. int BN_is_one(BIGNUM *a);
  10. int BN_is_word(BIGNUM *a, BN_ULONG w);
  11. int BN_is_odd(BIGNUM *a);
  12. =head1 DESCRIPTION
  13. BN_cmp() compares the numbers B<a> and B<b>. BN_ucmp() compares their
  14. absolute values.
  15. BN_is_zero(), BN_is_one() and BN_is_word() test if B<a> equals 0, 1,
  16. or B<w> respectively. BN_is_odd() tests if a is odd.
  17. BN_is_zero(), BN_is_one(), BN_is_word() and BN_is_odd() are macros.
  18. =head1 RETURN VALUES
  19. BN_cmp() returns -1 if B<a> E<lt> B<b>, 0 if B<a> == B<b> and 1 if
  20. B<a> E<gt> B<b>. BN_ucmp() is the same using the absolute values
  21. of B<a> and B<b>.
  22. BN_is_zero(), BN_is_one() BN_is_word() and BN_is_odd() return 1 if
  23. the condition is true, 0 otherwise.
  24. =head1 SEE ALSO
  25. L<bn(3)|bn(3)>
  26. =head1 HISTORY
  27. BN_cmp(), BN_ucmp(), BN_is_zero(), BN_is_one() and BN_is_word() are
  28. available in all versions of SSLeay and OpenSSL.
  29. BN_is_odd() was added in SSLeay 0.8.
  30. =cut