generate

package
v0.0.0-...-811459a Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2017 License: ISC Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// KeySize is the default key size for most types of encryption
	KeySize = 32
	// NonceSize is the default NonceSize
	NonceSize = 24
	// GCMNonceSize is the default gcmnonce size
	GCMNonceSize = 12
)

Variables

This section is empty.

Functions

func GCMNonce

func GCMNonce() (*[GCMNonceSize]byte, error)

GCMNonce returns a nonce with a GCMNonceSize

func Key

func Key() (*[KeySize]byte, error)

Key creates a new random secret key.

func Nonce

func Nonce() (*[NonceSize]byte, error)

Nonce creates a new random nonce.

func RandBytes

func RandBytes(size int) ([]byte, error)

RandBytes returns a slice of random bytes of the size given

func RandString

func RandString(length int) (string, error)

RandString returns a random string with the given length

Types

This section is empty.

Jump to

Keyboard shortcuts

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