public BigNumber(string data, string format) { fBigNum = OpenSSL.BN_new(); if (format.ToLower() == "d") { OpenSSL.BN_dec2bn(ref fBigNum, Encoding.ASCII.GetBytes(data)); } else if (format.ToLower() == "x") { OpenSSL.BN_hex2bn(ref fBigNum, Encoding.ASCII.GetBytes(data)); } else { throw new FormatException(); } }