algorithms

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRegisteredAlgorithmsNames added in v0.1.4

func GetRegisteredAlgorithmsNames() []string

GetRegisteredAlgorithmsNames returns a list of registered algorithms.

func Register added in v0.1.4

func Register(name string, a Algorithm) error

Register adds a value to the store of all algorithms

Types

type Algorithm

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

Algorithm implementations encrypt and decrypt data.

func Get added in v0.1.4

func Get(name string) (Algorithm, error)

Get allows us to retrieve an algorithm

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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