Ejemplo n.º 1
0
    static void SHA256(string name, int max, byte[] input, byte[] output)
    {
        int i = 0;

        try {
            for (; i < max; i++)
            {
                using (SHA256 digest = new SHA256Kernel()) {
                    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);
        }
    }
Ejemplo n.º 2
0
 static void SHA256(string name, int max, byte[] input, byte[] output)
 {
     int i = 0;
     try {
         for (; i < max; i++) {
             using (SHA256 digest = new SHA256Kernel ()) {
                 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);
     }
 }
Ejemplo n.º 3
0
 protected void SetUp()
 {
     CryptoDevTest.EnsureAvailability ();
     hash = new SHA256Kernel ();
 }
Ejemplo n.º 4
0
 protected void SetUp()
 {
     CryptoDevTest.EnsureAvailability(Crimson.CryptoDev.Cipher.SHA256);
     hash = new SHA256Kernel();
 }
Ejemplo n.º 5
0
 protected void SetUp()
 {
     CryptoDevTest.EnsureAvailability (Crimson.CryptoDev.Cipher.SHA256);
     hash = new SHA256Kernel ();
 }
Ejemplo n.º 6
0
 protected void SetUp()
 {
     CryptoDevTest.EnsureAvailability();
     hash = new SHA256Kernel();
 }