// Implement the ISecurityPolicyEncodable interface. public void FromXml(SecurityElement et, PolicyLevel level) { if (et == null) { throw new ArgumentNullException("et"); } if (et.Tag != "IMembershipCondition") { throw new ArgumentException(_("Security_PolicyName")); } if (et.Attribute("version") != "1") { throw new ArgumentException(_("Security_PolicyVersion")); } String value = et.Attribute("X509Certificate"); certificate = new X509Certificate (StrongNamePublicKeyBlob.FromHex(value)); }
// Implement the ISecurityPolicyEncodable interface. public void FromXml(SecurityElement et, PolicyLevel level) { if (et == null) { throw new ArgumentNullException("et"); } if (et.Tag != "IMembershipCondition") { throw new ArgumentException(_("Security_PolicyName")); } if (et.Attribute("version") != "1") { throw new ArgumentException(_("Security_PolicyVersion")); } String val = et.Attribute("HashValue"); value = StrongNamePublicKeyBlob.FromHex(val); val = et.Attribute("HashAlgorithm"); hashAlg = HashAlgorithm.Create(val); }