From: CryptoManiac Date: Sun, 23 Aug 2015 04:26:03 +0000 (+0300) Subject: Comments X-Git-Url: https://git.novaco.in/?a=commitdiff_plain;h=1edac525d07f68f781fea5d5fcc91c548623d912;hp=d9219d07dd440871488aba3034d770245a31af8c;p=NovacoinLibrary.git Comments --- diff --git a/Novacoin/Hash.cs b/Novacoin/Hash.cs index 0089f38..990ec7b 100644 --- a/Novacoin/Hash.cs +++ b/Novacoin/Hash.cs @@ -57,7 +57,7 @@ namespace Novacoin } /// - /// Initializes a new instance of Hash class with first 20 bytes from supplied list + /// Initializes a new instance of Hash class /// /// List of bytes public Hash(IEnumerable bytes, int skip = 0) @@ -65,12 +65,20 @@ namespace Novacoin _hashBytes = bytes.Skip(skip).Take(hashSize).ToArray(); } + /// + /// Initializes a new instance of Hash class + /// + /// Array of bytes public Hash(byte[] bytes, int offset = 0) { _hashBytes = new byte[hashSize]; Array.Copy(bytes, offset, _hashBytes, 0, hashSize); } + /// + /// Initializes a new instance of Hash class as a copy of another one + /// + /// Instance of hash class public Hash(Hash h) { _hashBytes = new byte[h.hashSize];