encryption

package
v0.335.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataEncryptor added in v0.334.0

type DataEncryptor interface {
	Encrypt(subKey SubKey, cleartext []byte) ([]byte, error)
	Decrypt(subKey SubKey, encrypted []byte) ([]byte, error)
}

type KMSEncryptor added in v0.328.1

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

KMSEncryptor encrypts and decrypts using a KMS key via tink.

func NewKMSEncryptorGenerateKey added in v0.328.1

func NewKMSEncryptorGenerateKey(uri string, v1client *awsv1kms.KMS) (*KMSEncryptor, error)

func NewKMSEncryptorWithKMS added in v0.328.1

func NewKMSEncryptorWithKMS(uri string, v1client *awsv1kms.KMS, encryptedKeyset []byte) (*KMSEncryptor, error)

func (*KMSEncryptor) Decrypt added in v0.328.1

func (k *KMSEncryptor) Decrypt(subKey SubKey, encrypted []byte) ([]byte, error)

func (*KMSEncryptor) Encrypt added in v0.328.1

func (k *KMSEncryptor) Encrypt(subKey SubKey, cleartext []byte) ([]byte, error)

func (*KMSEncryptor) GetEncryptedKeyset added in v0.328.1

func (k *KMSEncryptor) GetEncryptedKeyset() []byte

type NoOpEncryptorNext added in v0.328.1

type NoOpEncryptorNext struct{}

NoOpEncryptorNext does not encrypt and just passes the input as is.

func NewNoOpEncryptor added in v0.334.0

func NewNoOpEncryptor() NoOpEncryptorNext

func (NoOpEncryptorNext) Decrypt added in v0.328.1

func (n NoOpEncryptorNext) Decrypt(_ SubKey, encrypted []byte) ([]byte, error)

func (NoOpEncryptorNext) Encrypt added in v0.328.1

func (n NoOpEncryptorNext) Encrypt(_ SubKey, cleartext []byte) ([]byte, error)

type SubKey added in v0.328.1

type SubKey string
const (
	TimelineSubKey SubKey = "timeline"
	AsyncSubKey    SubKey = "async"
)

Jump to

Keyboard shortcuts

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