Exemplo n.º 1
0
 public static byte[] Half(byte[] input, uint? prefix = null)
 {
     var hasher = new Sha512();
     if (prefix != null)
     {
         hasher.AddU32((uint) prefix);
     }
     hasher.Add(input);
     return hasher.Finish256();
 }
Exemplo n.º 2
0
        public static byte[] Half(byte[] input, uint?prefix = null)
        {
            var hasher = new Sha512();

            if (prefix != null)
            {
                hasher.AddU32((uint)prefix);
            }
            hasher.Add(input);
            return(hasher.Finish256());
        }
Exemplo n.º 3
0
 public Hash256 CreateHash()
 {
     var half = new Sha512(Prefix().Bytes());
     ToBytesSink(half);
     return new Hash256(half.Finish256());
 }
Exemplo n.º 4
0
 public Hash256 Hash()
 {
     var hasher = new Sha512((uint) HashPrefix.LedgerMaster);
     ToBytes(hasher);
     return new Hash256(hasher.Finish256());
 }