BN_div function
BN_div divides numerator by divisor and places the result in quotient
and the remainder in rem. Either of quotient or rem may be NULL, in
which case the respective value is not returned. It returns one on success or
zero on error. It is an error condition if divisor is zero.
The outputs will be such that quotient * divisor + rem = numerator,
with the quotient rounded towards zero. Thus, if numerator is negative,
rem will be zero or negative. If divisor is negative, the sign of
quotient will be flipped to compensate but otherwise rounding will be as if
divisor were its absolute value.
Implementation
@meta.RecordUse()
@ffi.Native<
ffi.Int Function(
ffi.Pointer<BIGNUM>,
ffi.Pointer<BIGNUM>,
ffi.Pointer<BIGNUM>,
ffi.Pointer<BIGNUM>,
ffi.Pointer<BN_CTX>,
)
>(symbol: 'bssl_dart_BN_div')
external int BN_div(
ffi.Pointer<BIGNUM> quotient,
ffi.Pointer<BIGNUM> rem,
ffi.Pointer<BIGNUM> numerator,
ffi.Pointer<BIGNUM> divisor,
ffi.Pointer<BN_CTX> ctx,
);