BN_dec2bn() 개인적인 메소드

private BN_dec2bn ( IntPtr &a, byte str ) : int
a System.IntPtr
str byte
리턴 int
예제 #1
0
        /// <summary>
        /// Calls BN_dec2bn()
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        public static BigNumber FromDecimalString(string str)
        {
            byte[] buf = Encoding.ASCII.GetBytes(str);
            IntPtr ptr;
            int    ret = Native.BN_dec2bn(out ptr, buf);

            if (ret <= 0)
            {
                throw new OpenSslException();
            }
            return(new BigNumber(ptr, true));
        }