Guest User

Untitled

a guest
Jul 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <openssl/bn.h>
  2.  
  3. int
  4. main(void)
  5. {
  6. BIGNUM *z, *mz;
  7. z = BN_new();
  8. if (BN_zero(z) == 0)
  9. return (1);
  10.  
  11. mz = BN_new();
  12. if (BN_dec2bn(&mz, "-0") == 0)
  13. return (1);
  14.  
  15. printf("BN_is_zero(BN_zero()): %s\n", BN_is_zero(z) ? "yes" : "no");
  16. printf("BN_is_zero(BN_dec2bn(\"-0\")): %s\n", BN_is_zero(mz) ? "yes" : "no");
  17. printf("BN_cmp(BN_zero(), BN_dec2bn(\"-0\")): %d\n", BN_cmp(z, mz));
  18. return (0);
  19. }
Add Comment
Please, Sign In to add comment