GetHashCode() public method

public GetHashCode ( ) : int
return int
Esempio n. 1
0
 public static void HashMembershipConditionCallMethods()
 {
     HashMembershipCondition hmc = new HashMembershipCondition(Cryptography.SHA1.Create(), new byte[1]);
     bool check = hmc.Check(new Evidence());
     IMembershipCondition obj = hmc.Copy();
     check = hmc.Equals(new object());
     int hash = hmc.GetHashCode();
     string str = hmc.ToString();
     SecurityElement se = new SecurityElement("");
     PolicyLevel pl = (PolicyLevel)Activator.CreateInstance(typeof(PolicyLevel), true);
     hmc.FromXml(se);
     hmc.FromXml(se, pl);
     se = hmc.ToXml();
     se = hmc.ToXml(pl);
 }
		public void GetHashCode_ ()
		{
			HashMembershipCondition hash = new HashMembershipCondition (md5, digestMd5);
			HashMembershipCondition copy = (HashMembershipCondition)hash.Copy ();
			Assert.AreEqual (hash.GetHashCode (), copy.GetHashCode ());
		}