public override String ToString() { StringBuilder builder = new StringBuilder(); builder.Append("Hash - "); builder.Append(hashAlg.GetType().AssemblyQualifiedName); builder.Append(" = "); builder.Append(StrongNamePublicKeyBlob.ToHex(value)); return(builder.ToString()); }
// Convert this object into a string. public override String ToString() { SecurityElement element; element = new SecurityElement("System.Security.Policy.Hash"); element.AddAttribute("version", "1"); byte[] rawData = RawData; if (rawData != null && rawData.Length != 0) { element.AddChild(new SecurityElement ("RawData", StrongNamePublicKeyBlob.ToHex(rawData))); } return(element.ToString()); }
public SecurityElement ToXml(PolicyLevel level) { SecurityElement element; element = new SecurityElement("IMembershipCondition"); element.AddAttribute ("class", SecurityElement.Escape (typeof(HashMembershipCondition). AssemblyQualifiedName)); element.AddAttribute("version", "1"); element.AddAttribute ("HashValue", StrongNamePublicKeyBlob.ToHex(value)); element.AddAttribute ("HashAlgorithm", SecurityElement.Escape(hashAlg.GetType().FullName)); return(element); }