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