Пример #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 SHA256OpenSsl()) {
                    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
 protected void SetUp()
 {
     hash = new SHA256OpenSsl();
 }
Пример #3
0
 static void SHA256(string name, int max, byte[] input, byte[] output)
 {
     int i = 0;
     try {
         for (; i < max; i++) {
             using (SHA256 digest = new SHA256OpenSsl ()) {
                 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);
     }
 }
Пример #4
0
 protected void SetUp()
 {
     hash = new SHA256OpenSsl ();
 }