secret

package
v0.0.0-...-2a03479 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package secret implements some simple symmetric encryption functions and is shamelessly blagged from Vulcand. See https://github.com/vulcand/vulcand/blob/7b479b160401beccbc9521b922588fa2a64c4818/secret/secret.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyFromString

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

KeyFromString converts a string into a symmetric key.

func NewKeyString

func NewKeyString() (string, error)

NewKeyString generates a new seal key in string format.

Types

type Box

type Box interface {
	Seal(value []byte) ([]byte, error)
	Open(value []byte) ([]byte, error)
}

Box represents somewhere to store secrets.

func NewBox

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

NewBox creates a secret box with the given key.

func NewBoxFromKeyString

func NewBoxFromKeyString(keyS string) (Box, error)

NewBoxFromKeyString creates a secret Box with the given key.

Jump to

Keyboard shortcuts

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