/// <summary> /// Returns a string representation of the packet. This is /// a human readable formated representation that has nothing /// to do with OpenPGP or RFC2440 /// </summary> /// <returns>String representation of the packet.</returns> /// <remarks>No remarks</remarks> public override string ToString() { string strReturn = ""; strReturn += "Signature Packet:\r\n"; strReturn += "Version: " + Version.ToString() + "\r\n"; strReturn += "Signaturetype: " + SignatureType.ToString() + "\r\n"; strReturn += "Signaturealgorithm: " + SignatureAlgorithm.ToString() + "\r\n"; strReturn += "Hashalgorithm: " + HashAlgorithm.ToString() + "\r\n"; strReturn += "Time Created: " + TimeCreated.ToLocalTime() + "\r\n"; strReturn += "KeyID: " + KeyID + "\r\n"; strReturn += "Hashed Subpackets: " + HashedSubPackets.Length + "\r\n"; for (int i = 0; i < HashedSubPackets.Length; i++) { strReturn += HashedSubPackets[i].ToString() + "\r\n"; } strReturn += "\r\nUnhashed Subpackets: " + UnhashedSubPackets.Length + "\r\n"; for (int i = 0; i < UnhashedSubPackets.Length; i++) { strReturn += UnhashedSubPackets[i].ToString() + "\r\n"; } strReturn += "Key Material:\r\n"; for (int i = 0; i < Signature.Length; i++) { strReturn += Signature[i].ToString(16) + "\r\n\r\n"; } return(strReturn + "----\r\n\r\n"); }
/// <summary> /// Returns a string representation of the packet. This is /// a human readable formated representation that has nothing /// to do with OpenPGP or RFC2440 /// </summary> /// <returns>String representation of the packet.</returns> /// <remarks>No remarks</remarks> public override string ToString() { string strReturn = ""; strReturn += "PublicKeyPacket:\r\n"; strReturn += "Version: " + Version.ToString() + "\r\n"; strReturn += "Algorithm: " + Algorithm.ToString() + "\r\n"; strReturn += "Time Created: " + TimeCreated.ToLocalTime() + "\r\n"; strReturn += "Fingerprint: 0x" + Fingerprint.ToString(16) + "\r\n"; strReturn += "KeyID: " + KeyID.ToString() + "\r\n"; strReturn += "Key Material:\r\n"; for (int i = 0; i < KeyMaterial.Length; i++) { strReturn += KeyMaterial[i].ToString(16) + "\r\n\r\n"; } return(strReturn + "----\r\n\r\n"); }