Documentation ¶
Overview ¶
Package message used as a storage and loading of encrypted messages.
The package allows initializing verification of the correctness of the message by the hash length and proof of work.
Index ¶
- Constants
- Variables
- type IMessage
- type ISettings
- type SMessage
- func (p *SMessage) GetEncKey() []byte
- func (p *SMessage) GetHash() []byte
- func (p *SMessage) GetPayload() []byte
- func (p *SMessage) GetPubKey() []byte
- func (p *SMessage) GetSalt() []byte
- func (p *SMessage) GetSign() []byte
- func (p *SMessage) IsValid(psett ISettings) bool
- func (p *SMessage) ToBytes() []byte
- func (p *SMessage) ToString() string
- type SSettings
Constants ¶
View Source
const (
CSeparator = "@"
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type IMessage ¶
type IMessage interface { types.IConverter IsValid(ISettings) bool GetPubKey() []byte // Public key of the sender. GetEncKey() []byte // One-time key of encryption data. GetSalt() []byte // Random bytes for hide data of the hash. GetHash() []byte // Hash of the (sender + receiver + payload). GetSign() []byte // Sign of the hash. GetPayload() []byte // Main data in the ecnrypted bytes format. }
func LoadMessage ¶
Message can be created only with client module.
type ISettings ¶ added in v1.5.7
func NewSettings ¶ added in v1.5.7
Click to show internal directories.
Click to hide internal directories.