SHA256 algorithm implementation.
Inheritance: System.Security.Cryptography.HashAlgorithm
Esempio n. 1
0
 public void InputBlockSizeTest()
 {
     SHA256Hash target = new SHA256Hash(); // TODO: Initialize to an appropriate value
     int actual;
     actual = target.InputBlockSize;
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Esempio n. 2
0
 public void CanTransformMultipleBlocksTest()
 {
     SHA256Hash target = new SHA256Hash(); // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.CanTransformMultipleBlocks;
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
 /// <summary>
 /// Hashes the specified data bytes.
 /// </summary>
 /// <param name="hashBytes">Data to hash.</param>
 /// <returns>
 /// Hashed bytes
 /// </returns>
 protected override byte[] Hash(byte[] hashBytes)
 {
     using (var md = new SHA256Hash())
     {
         return md.ComputeHash(hashBytes);
     }
 }
Esempio n. 4
0
 public void InitializeTest()
 {
     SHA256Hash target = new SHA256Hash(); // TODO: Initialize to an appropriate value
     target.Initialize();
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Esempio n. 5
0
 public void SHA256HashConstructorTest()
 {
     SHA256Hash target = new SHA256Hash();
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
 /// <summary>
 /// Hashes the specified data bytes.
 /// </summary>
 /// <param name="hashBytes">Data to hash.</param>
 /// <returns>
 /// Hashed bytes
 /// </returns>
 protected override byte[] Hash(IEnumerable<byte> hashBytes)
 {
     using (var md = new SHA256Hash())
     {
         return md.ComputeHash(hashBytes.ToArray());
     }
 }