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); } }
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); } }
protected void SetUp() { CryptoDevTest.EnsureAvailability (); hash = new SHA256Kernel (); }
protected void SetUp() { CryptoDevTest.EnsureAvailability(Crimson.CryptoDev.Cipher.SHA256); hash = new SHA256Kernel(); }
protected void SetUp() { CryptoDevTest.EnsureAvailability (Crimson.CryptoDev.Cipher.SHA256); hash = new SHA256Kernel (); }
protected void SetUp() { CryptoDevTest.EnsureAvailability(); hash = new SHA256Kernel(); }