cryptrr

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2020 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 CiphMsg

type CiphMsg struct {
	LocalPK [32]byte
	Nonce   [32]byte
	Ctext   []byte
}

CiphMsg is an enciphered message.

type PlainMsg

type PlainMsg struct {
	Cmd  string
	Args rlp.RawValue
}

PlainMsg is a plaintext message.

func NewPlainMsg

func NewPlainMsg(cmd string, args ...interface{}) PlainMsg

NewPlainMsg constructs a plain message.

func (PlainMsg) Encrypt

func (pmsg PlainMsg) Encrypt(localSK [32]byte, remotePK [32]byte, isServer bool) CiphMsg

Encrypt encrypts a PlainMsg to be decoded by someone holding the secret key to remotePK.

Jump to

Keyboard shortcuts

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