Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Contact ¶
Contact implements the Contact interface defined in interface/contact.go, in go, the structure is meant to be edited directly, the functions are for bindings compatibility.
func (Contact) GetChecksum ¶
GetChecksum generates a 16-byte checksum of the Contact.
func (Contact) GetChecksumVer1 ¶
GetChecksum generates a 16-byte checksum of the Contact.
func (Contact) GetFingerprint ¶
GetFingerprint creates a 15 character long fingerprint of the contact off of the ID and DH public key.
func (Contact) Marshal ¶
Marshal saves the Contact in a compact binary format with base 64 encoding. The data has a header and footer that specify the format version and allow the data to be recognized in a stream of data. The format has the following structure.
+----------------+---------------------------------------------------------------------------------------------------+--------+ | header | contact data | footer | +------+---------+----------+----------+----------+-----------------+----------------+---------+----------+----------+--------+ | Open | | ID | DhPubKey | | OwnershipProof | | Facts | | checksum | Close | | Tag | Version | | size | DhPubKey | size | OwnershipProof | size | FactList | | Tag | | | | 33 bytes | 2 bytes | | 2 bytes | | 2 bytes | | 16 bytes | | +------+---------+----------+----------+----------+-----------------+----------------+---------+----------+----------+--------+ | string | base 64 encoded | string | +----------------+---------------------------------------------------------------------------------------------------+--------+