algorithms

package
v0.0.0-...-9af3c23 Latest Latest
Warning

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

Go to latest
Published: May 7, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAlgorithms

func GetAlgorithms() []string

GetAlgorithms returns a list of registered algorithms.

func GetDefaultAlgorithm

func GetDefaultAlgorithm() string

GetDefaultAlgorithm returns the default algorithm.

Types

type Algorithm

type Algorithm interface {
	Encrypt(key *[32]byte, data []byte) ([]byte, error)
	Decrypt(key *[32]byte, ciphertext []byte) ([]byte, error)
	Label() string
	NeedsKey() bool
}

Algorithm implementations encrypt and decrypt data.

func New

func New(algorithm string) (Algorithm, error)

New returns an Algorithm corresponding to the requested cipher.

Jump to

Keyboard shortcuts

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