SHA1 algorithm implementation
Inheritance: System.Security.Cryptography.HashAlgorithm
 /// <summary>
 /// Hashes the specified data bytes.
 /// </summary>
 /// <param name="hashData">The hash data.</param>
 /// <returns>
 /// Hashed bytes
 /// </returns>
 protected virtual byte[] Hash(byte[] hashData)
 {
     using (var sha1 = new Renci.SshNet.Security.Cryptography.SHA1Hash())
     {
         return(sha1.ComputeHash(hashData, 0, hashData.Length));
     }
 }
Exemple #2
0
 public void InputBlockSizeTest()
 {
     SHA1Hash target = new SHA1Hash(); // TODO: Initialize to an appropriate value
     int actual;
     actual = target.InputBlockSize;
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemple #3
0
 public void CanTransformMultipleBlocksTest()
 {
     SHA1Hash target = new SHA1Hash(); // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.CanTransformMultipleBlocks;
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemple #4
0
 /// <summary>
 /// Hashes the specified data bytes.
 /// </summary>
 /// <param name="hashData">The hash data.</param>
 /// <returns>
 /// Hashed bytes
 /// </returns>
 protected virtual byte[] Hash(byte[] hashData)
 {
     using (var sha1 = new SHA1Hash())
     {
         return sha1.ComputeHash(hashData, 0, hashData.Length);
     }
 }
Exemple #5
0
 /// <summary>
 /// Hashes the specified data bytes.
 /// </summary>
 /// <param name="hashData">The hash data.</param>
 /// <returns>
 /// Hashed bytes
 /// </returns>
 protected virtual byte[] Hash(byte[] hashData)
 {
     using (var sha1 = new Renci.SshNet.Security.Cryptography.SHA1Hash())
     {
         return sha1.ComputeHash(hashData, 0, hashData.Length);
     }
 }
Exemple #6
0
 public void InitializeTest()
 {
     SHA1Hash target = new SHA1Hash(); // TODO: Initialize to an appropriate value
     target.Initialize();
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Exemple #7
0
 public void SHA1HashConstructorTest()
 {
     SHA1Hash target = new SHA1Hash();
     Assert.Inconclusive("TODO: Implement code to verify target");
 }