secret

package
v0.8.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyFromString

func KeyFromString(key string) (*[keyLength]byte, error)

func NewKeyString

func NewKeyString() (string, error)

func SealKeyPairToJSON

func SealKeyPairToJSON(box *Box, keyPair *engine.KeyPair) ([]byte, error)

func SealedValueToJSON

func SealedValueToJSON(b *SealedBytes) ([]byte, error)

Types

type Box

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

func NewBox

func NewBox(bytes *[keyLength]byte) (*Box, error)

func NewBoxFromKeyString

func NewBoxFromKeyString(keyS string) (*Box, error)

func (*Box) Open

func (b *Box) Open(e *SealedBytes) ([]byte, error)

func (*Box) Seal

func (b *Box) Seal(value []byte) (*SealedBytes, error)

type SealedBytes

type SealedBytes struct {
	Val   []byte
	Nonce []byte
}

func SealedValueFromJSON

func SealedValueFromJSON(bytes []byte) (*SealedBytes, error)

Jump to

Keyboard shortcuts

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