Example #1
0
        public static BigNumber operator /(BigNumber left, BigNumber right)
        {
            //Ensure that the BigNums have not been disposed
            if (left.fDisposed)
            {
                throw new ObjectDisposedException("left");
            }
            if (right.fDisposed)
            {
                throw new ObjectDisposedException("right");
            }

            //Actually do the operation
            IntPtr res = OpenSSL.BN_new();
            IntPtr ctx = OpenSSL.BN_CTX_new();

            OpenSSL.BN_div(res, IntPtr.Zero, left.fBigNum, right.fBigNum, ctx);
            OpenSSL.BN_CTX_free(ctx);
            return(new BigNumber(res));
        }