sealer

package
v0.0.0-...-e2c7029 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2016 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyLength   = 32
	NonceLength = 24
)

Variables

View Source
var (
	ErrSeal = errors.New("sealer: sealing failed!")
	ErrOpen = errors.New("sealer: opening failed!")
)
View Source
var NaclSecretboxSealer = &NaclSecretbox{entropyImplementation: entropy.CryptoRand}

naclSecretboxSealer uses nacl/secretbox for symmetric encryption. The crypto/rand library is used as the default entropy source.

Functions

This section is empty.

Types

type Envelope

type Envelope struct {
	Metadata map[string][]interface{}
	Message  []byte
	Nonce    []byte
}

type NaclSecretbox

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

func (*NaclSecretbox) Open

func (sb *NaclSecretbox) Open(env *Envelope) (secret []byte, err error)

func (*NaclSecretbox) Seal

func (sb *NaclSecretbox) Seal(post postage) (env *Envelope, err error)

type Sealer

type Sealer interface {
	Seal(postage) (env *Envelope, err error)
}

Jump to

Keyboard shortcuts

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