Documentation ¶
Index ¶
Constants ¶
View Source
const (
NonceSize = 24
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Identifier ¶
type Identifier struct { Description string // explain what the content is Mime string // mime type to describe Content Content []byte // picture, audio etc }
func NewIdentifier ¶
func NewIdentifier(description, filename string) (*Identifier, error)
type Identity ¶
type Identity struct { PublicIdentity PublicIdentity Key *[privKeySize]byte // private key, exported for JSON }
func NewIdentity ¶
func UnmarshalIdentity ¶
type Message ¶
type Message struct { Nonce [NonceSize]byte // NOT secret Signature *[signatureSize]byte // signature of the encrypted box Box []byte // NaCl box }
func UnmarshalMessage ¶
type PublicIdentity ¶
type PublicIdentity struct { Name string Address string Key *[pubKeySize]byte Signature *[signatureSize]byte Identifiers []*Identifier }
func UnmarshalPublicIdentity ¶
func UnmarshalPublicIdentity(blob []byte) (*PublicIdentity, error)
func (*PublicIdentity) Fingerprint ¶
func (p *PublicIdentity) Fingerprint() string
Finger print public key
func (*PublicIdentity) Marshal ¶
func (p *PublicIdentity) Marshal() ([]byte, error)
func (*PublicIdentity) Verify ¶
func (p *PublicIdentity) Verify() bool
Verify authenticity of public key
Click to show internal directories.
Click to hide internal directories.