secret

package
v1.2.72 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: Apache-2.0 Imports: 10 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAesSecretKey added in v1.2.5

func GenerateAesSecretKey() ([]byte, error)

func IsExtractDataError

func IsExtractDataError(err error) bool

Types

type AesEncoder added in v1.2.5

type AesEncoder struct {
	CipherBlock cipher.Block
}

func NewAesEncoder added in v1.2.5

func NewAesEncoder(key []byte) (*AesEncoder, error)

func (*AesEncoder) Decrypt added in v1.2.5

func (s *AesEncoder) Decrypt(data []byte) ([]byte, error)

func (*AesEncoder) Encrypt added in v1.2.5

func (s *AesEncoder) Encrypt(data []byte) ([]byte, error)

type Encoder added in v1.2.5

type Encoder interface {
	Encrypt(data []byte) ([]byte, error)
	Decrypt(encodedData []byte) ([]byte, error)
}

type YamlEncoder added in v1.2.5

type YamlEncoder struct {
	Encoder Encoder
	// contains filtered or unexported fields
}

YamlEncoder is an Encoder compatible object with additional helpers to work with yaml data: EncryptYamlData and DecryptYamlData

func NewYamlEncoder added in v1.2.5

func NewYamlEncoder(encoder Encoder) *YamlEncoder

func (*YamlEncoder) Decrypt added in v1.2.5

func (s *YamlEncoder) Decrypt(data []byte) ([]byte, error)

func (*YamlEncoder) DecryptYamlData added in v1.2.5

func (s *YamlEncoder) DecryptYamlData(data []byte) ([]byte, error)

func (*YamlEncoder) Encrypt added in v1.2.5

func (s *YamlEncoder) Encrypt(data []byte) ([]byte, error)

func (*YamlEncoder) EncryptYamlData added in v1.2.5

func (s *YamlEncoder) EncryptYamlData(data []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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