Пример #1
0
    static void SHA1(string name, int max, byte[] input, byte[] output)
    {
        int i = 0;

        try {
            for (; i < max; i++)
            {
                using (SHA1 digest = new SHA1Kernel()) {
                    if (!Compare(output, digest.ComputeHash(input)))
                    {
                        throw new Exception(name + " " + i.ToString());
                    }
                }
                Process(name, i, max);
            }
        }
        catch (Exception e) {
            Console.WriteLine("{0} #{1} : {2}", name, i, e);
        }
    }
Пример #2
0
 static void SHA1(string name, int max, byte[] input, byte[] output)
 {
     int i = 0;
     try {
         for (; i < max; i++) {
             using (SHA1 digest = new SHA1Kernel ()) {
                 if (!Compare (output, digest.ComputeHash (input)))
                     throw new Exception (name + " " + i.ToString ());
             }
             Process (name, i, max);
         }
     }
     catch (Exception e) {
         Console.WriteLine ("{0} #{1} : {2}", name, i, e);
     }
 }
Пример #3
0
 protected void SetUp()
 {
     CryptoDevTest.EnsureAvailability (Crimson.CryptoDev.Cipher.SHA1);
     hash = new SHA1Kernel ();
 }
Пример #4
0
 protected void SetUp()
 {
     CryptoDevTest.EnsureAvailability(Crimson.CryptoDev.Cipher.SHA1);
     hash = new SHA1Kernel();
 }
Пример #5
0
 protected void SetUp()
 {
     CryptoDevTest.EnsureAvailability();
     hash = new SHA1Kernel();
 }
Пример #6
0
 protected void SetUp()
 {
     CryptoDevTest.EnsureAvailability ();
     hash = new SHA1Kernel ();
 }