Method: OpenSSL::BN#-@
- Defined in:
- ossl_bn.c
#- ⇒ Object
975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 |
# File 'ossl_bn.c', line 975 static VALUE ossl_bn_uminus(VALUE self) { VALUE obj; BIGNUM *bn1, *bn2; GetBN(self, bn1); obj = NewBN(cBN); bn2 = BN_dup(bn1); if (!bn2) ossl_raise(eBNError, "BN_dup"); SetBN(obj, bn2); BN_set_negative(bn2, !BN_is_negative(bn2)); return obj; } |