Exemplo n.º 1
0
 public static ByteString ToByteString(this string hexString)
 {
     return(ByteString.CopyFrom(ByteArrayHelper.HexStringToByteArray(hexString)));
 }
Exemplo n.º 2
0
        /// <summary>
        /// Loads the content value represented in hex string.
        /// </summary>
        /// <param name="hex"></param>
        /// <returns></returns>
        /// <exception cref="ArgumentOutOfRangeException"></exception>
        public static Hash HexStringToHash(string hex)
        {
            var bytes = ByteArrayHelper.HexStringToByteArray(hex);

            return(Hash.FromByteArray(bytes));
        }