private BN_hex2bn ( |
||
a | ||
str | byte | |
return | int |
public static extern int BN_hex2bn(out IntPtr a, byte[] str);
/// <summary> /// Calls BN_hex2bn() /// </summary> /// <param name="str"></param> /// <returns></returns> public static BigNumber FromHexString(string str) { byte[] buf = Encoding.ASCII.GetBytes(str); IntPtr ptr; int ret = Native.BN_hex2bn(out ptr, buf); if (ret <= 0) { throw new OpenSslException(); } return(new BigNumber(ptr, true)); }