crypto

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderNewFunc = map[string]func() Crypto{}

ProviderNewFunc creates

View Source
var Providers = map[string]Crypto{}

Providers stores Crypto implementations

Functions

func Init

func Init(cryptoProvider string)

Init creates specified Crypto implementation and stores it in Providers

func Register

func Register(s string, f func() Crypto)

Register stores Crypto implementation's newFunc.

Types

type Crypto

type Crypto interface {
	Encrypt([]byte) ([]byte, error)
	Decrypt([]byte) ([]byte, error)
}

Crypto defines crypto operations

Jump to

Keyboard shortcuts

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