secret

package
v1.2.146 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 10 Imported by: 1

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

func MergeEncodedYaml added in v1.2.117

func MergeEncodedYaml(oldData, newData, oldEncodedData, newEncodedData []byte) ([]byte, error)

func MergeEncodedYamlNode added in v1.2.117

func MergeEncodedYamlNode(oldConfig, newConfig, oldEncodedConfig, newEncodedConfig *yaml_v3.Node) (*yaml_v3.Node, error)

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