decryptor

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePrivateKey

func ParsePrivateKey(key []byte) (*rsa.PrivateKey, error)

Types

type ConfigDecryptor

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

func NewConfigDecryptor

func NewConfigDecryptor(valueDecryptor *ValueDecryptor) *ConfigDecryptor

func (ConfigDecryptor) Decrypt

func (c ConfigDecryptor) Decrypt(output io.Writer, input io.Reader) (err error)

type Decryptor

type Decryptor interface {
	Decrypt(output io.Writer, input io.Reader) (err error)
}

func NewDecryptor

func NewDecryptor(key []byte) (Decryptor, error)

type ValueDecryptor

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

func NewValueDecryptor

func NewValueDecryptor(key []byte, options ...ValueDecryptorOption) (*ValueDecryptor, error)

func (ValueDecryptor) DecryptValue

func (d ValueDecryptor) DecryptValue(value string) (string, error)

type ValueDecryptorOption

type ValueDecryptorOption func(decryptor *ValueDecryptor) error

func WithSalt

func WithSalt(salt string) ValueDecryptorOption

Jump to

Keyboard shortcuts

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