SHA256 algorithm implementation.
상속: System.Security.Cryptography.HashAlgorithm
예제 #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.");
 }
예제 #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);
     }
 }
예제 #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.");
 }
예제 #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());
     }
 }