model

package
v0.0.0-...-8204e9e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Raw       []byte
	Hash      string
	Timestamp string
}

func (*Message) Decrypt

func (msg *Message) Decrypt(keys *cryptography.KeyPair) (*PlainMessage, error)

type PlainMessage

type PlainMessage struct {
	Message *protobuf.DataMessage
	From    string
}

func MakePlain

func MakePlain(data string) *PlainMessage

func (*PlainMessage) Body

func (plain *PlainMessage) Body() *string

func (*PlainMessage) Encrypt

func (msg *PlainMessage) Encrypt(keys *cryptography.KeyPair, to string) ([]byte, error)

func (*PlainMessage) ReplyTag

func (plain *PlainMessage) ReplyTag() []byte

func (*PlainMessage) When

func (plain *PlainMessage) When() time.Time

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL