2
0

BN_cmp.pod 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 COPYRIGHT
  25. Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
  26. Licensed under the OpenSSL license (the "License"). You may not use
  27. this file except in compliance with the License. You can obtain a copy
  28. in the file LICENSE in the source distribution or at
  29. L<https://www.openssl.org/source/license.html>.
  30. =cut