BN_SET_NEGATIVE(3)
π BN_SET_NEGATIVE(3) π
okay so bestie, welcome to the Library Functions Manual era of your life β this is the page about poking at a BIGNUM and asking it "are you negative or not, be honest" π«Ά
β¨ NAME β¨
BN_set_negative, BN_is_negative β change and inspect the sign of a BIGNUM, no cap π
πΈ SYNOPSIS πΈ
library βlibcryptoβ
#include <openssl/bn.h>
void
BN_set_negative(BIGNUM *b, int n);
int
BN_is_negative(const BIGNUM *b);
π¦ DESCRIPTION π¦
Okay so BN_set_negative() is literally the vibe-setter here. It sets b to negative if both b and n are non-zero β otherwise it sets it to positive. That's it, that's the whole mood. Both gotta be non-zero for the negativity to hit, iykyk β¨
And BN_is_negative()? That's the vibe check. It tests the sign of b. Just a little peek at whether your number is out here being negative or not π
π RETURN VALUES π
BN_is_negative() returns 1 if b is negative, or 0 otherwise. Binary queen β no in-between, no "it's complicated" π
π§ SEE ALSO π§
BN_add(3), BN_new(3), BN_set_bit(3), BN_zero(3) β go read these next, they're all iconic in their own way π
β HISTORY β
BN_set_negative() and BN_is_negative() first appeared in OpenSSL 0.9.8 and have been available since OpenBSD 4.5. like, they've been serving sign-flip realness since forever, fr fr π
ok that's the whole page bestie, go forth and be negative (or don't, that's also valid) πβ¨
Debian πΈ June 8, 2025 π¦ β signed off with love, mwah π π
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms