encryption

package
v0.0.0-...-7334d01 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptionService

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

EncryptionService provides encryption and decryption for sensitive configuration values

func NewEncryptionService

func NewEncryptionService(passphrase string) *EncryptionService

NewEncryptionService creates a new encryption service with a PBKDF2-hardened passphrase.

func (*EncryptionService) Decrypt

func (es *EncryptionService) Decrypt(ciphertext string) (string, error)

Decrypt decrypts a base64-encoded ciphertext and returns the plaintext

func (*EncryptionService) DecryptBytes

func (es *EncryptionService) DecryptBytes(ciphertext []byte) ([]byte, error)

DecryptBytes decrypts versioned ciphertext bytes and returns the plaintext bytes.

func (*EncryptionService) DecryptConfigurationValues

func (es *EncryptionService) DecryptConfigurationValues(config map[string]interface{}, secretFields []string) (map[string]interface{}, error)

DecryptConfigurationValues decrypts sensitive values in a configuration map

func (*EncryptionService) Encrypt

func (es *EncryptionService) Encrypt(plaintext string) (string, error)

Encrypt encrypts a plaintext string and returns a versioned, base64-encoded ciphertext.

func (*EncryptionService) EncryptBytes

func (es *EncryptionService) EncryptBytes(plaintext []byte) ([]byte, error)

EncryptBytes encrypts raw bytes and returns the versioned ciphertext bytes.

func (*EncryptionService) EncryptConfigurationValues

func (es *EncryptionService) EncryptConfigurationValues(config map[string]interface{}, secretFields []string) (map[string]interface{}, error)

EncryptConfigurationValues encrypts sensitive values in a configuration map

Jump to

Keyboard shortcuts

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