encrypt

package
v1.7.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AESEncryptor

type AESEncryptor struct {
	// contains filtered or unexported fields
}

AESEncryptor uses AES to encrypt or decrypt string

func (*AESEncryptor) Decrypt

func (a *AESEncryptor) Decrypt(ciphertext string) (string, error)

Decrypt ...

func (*AESEncryptor) Encrypt

func (a *AESEncryptor) Encrypt(plaintext string) (string, error)

Encrypt ...

type Encryptor

type Encryptor interface {
	// Encrypt encrypts plaintext
	Encrypt(string) (string, error)
	// Decrypt decrypts ciphertext
	Decrypt(string) (string, error)
}

Encryptor encrypts or decrypts a strings

func NewAESEncryptor

func NewAESEncryptor(keyProvider comcfg.KeyProvider,
	keyParams map[string]interface{}) Encryptor

NewAESEncryptor returns an instance of an AESEncryptor

Jump to

Keyboard shortcuts

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