Use BouncyCastle hashing functions
[NovacoinLibrary.git] / Novacoin / Hash.cs
index 3d757f1..b9e6d0c 100644 (file)
  */
 
 using System;
-using System.Security.Cryptography;
-using System.Collections.Generic;
 using System.Linq;
 
-using System.Numerics;
-
 namespace Novacoin
 {
     public abstract class Hash
     {
         /// <summary>
-        /// Computes the SHA256 hash for the input data using the managed library.
-        /// </summary>
-        protected static SHA256Managed _hasher256 = new SHA256Managed();
-        
-        /// <summary>
         /// Array of digest bytes.
         /// </summary>
         protected byte[] _hashBytes = null;
@@ -61,15 +52,6 @@ namespace Novacoin
         /// <summary>
         /// Initializes a new instance of Hash class
         /// </summary>
-        /// <param name="bytesList">List of bytes</param>
-        public Hash(IEnumerable<byte> bytes, int skip = 0)
-        {
-            _hashBytes = bytes.Skip(skip).Take(hashSize).ToArray();
-        }
-
-        /// <summary>
-        /// Initializes a new instance of Hash class
-        /// </summary>
         /// <param name="bytesList">Array of bytes</param>
         public Hash(byte[] bytes, int offset = 0)
         {