signer

package
v0.0.0-...-9774c77 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NonceLength = 24
	KeyLength   = 32
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClearText

type ClearText struct {
}

func NewClearText

func NewClearText() *ClearText

func (*ClearText) Decode

func (c *ClearText) Decode(encMsg []byte) ([]byte, error)

func (*ClearText) Encode

func (c *ClearText) Encode(rawMsg []byte) ([]byte, error)

type Secretbox

type Secretbox struct {
	// contains filtered or unexported fields
}

func NewSecretBox

func NewSecretBox(key [KeyLength]byte) *Secretbox

func (*Secretbox) Decode

func (s *Secretbox) Decode(encMsg []byte) (msg []byte, err error)

func (*Secretbox) Encode

func (s *Secretbox) Encode(rawMsg []byte) (encMsg []byte, err error)

type Signer

type Signer interface {
	Encode(rawMsg []byte) ([]byte, error)
	Decode(encMsg []byte) ([]byte, error)
}

Signer implements encoding and decoding methods for messages

Jump to

Keyboard shortcuts

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