private void CompareKeys() { byte[] key = new byte[32]; using (RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider()) rng.GetBytes(key); SerpentA a = new SerpentA(); int[] key1 = a.GetKey(key); SerpentB b = new SerpentB(); int[] key2 = b.GetKey(key); if (Compare.AreEqual(key1, key2) == false) throw new Exception("Key test failure: Keys are not equal!"); }
private void CompareKeys() { byte[] key = new byte[32]; using (RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider()) rng.GetBytes(key); SerpentA a = new SerpentA(); int[] key1 = a.GetKey(key); SerpentB b = new SerpentB(); int[] key2 = b.GetKey(key); if (Compare.AreEqual(key1, key2) == false) { throw new Exception("Key test failure: Keys are not equal!"); } }