Пример #1
0
        public string CalculateHash()
        {
            string fromAddressDER  = BitConverter.ToString(FromAddress.toDer()).Replace("-", "");
            string toAddressDER    = BitConverter.ToString(ToAddress.toDer()).Replace("-", "");
            string transactionData = fromAddressDER + toAddressDER + Amount;

            byte[] tdBytes = Encoding.ASCII.GetBytes(transactionData);
            return(BitConverter.ToString(SHA256.Create().ComputeHash(tdBytes)).Replace("-", ""));
        }