4 using System.Collections.Generic;
6 using System.Security.Cryptography;
13 /// Representation of SHA-256 hash
15 public class Hash256 : Hash
18 public override int hashSize
23 public Hash256() : base() { }
24 public Hash256(byte[] bytesArray) : base(bytesArray) { }
25 public Hash256(IList<byte> bytesList) : base(bytesList) { }
27 public static Hash256 Compute256(IEnumerable<byte> inputBytes)
29 byte[] dataBytes = inputBytes.ToArray();
30 byte[] digest1 = _hasher256.ComputeHash(dataBytes, 0, dataBytes.Length);
31 byte[] digest2 = _hasher256.ComputeHash(digest1, 0, digest1.Length);
33 return new Hash256(digest2);