keyringencdec

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package keyringencdec provides a value encoder/decoder backed by the OS keyring. It encrypts string values with AES-256-GCM and persists the key in the OS keyring. Ensure a compatible keyring backend is available in headless/container environments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptedStringValueEncoderDecoder

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

EncryptedStringValueEncoderDecoder uses AES-256-GCM + base64 for encoding/decoding and persists the AES key in the OS keyring under the configured service/username.

func NewEncryptedStringValueEncoderDecoder

func NewEncryptedStringValueEncoderDecoder(
	service, username string,
	opts ...Option,
) (*EncryptedStringValueEncoderDecoder, error)

NewEncryptedStringValueEncoderDecoder constructs a new instance.

func (*EncryptedStringValueEncoderDecoder) Decode

func (*EncryptedStringValueEncoderDecoder) Encode

type Option

Option is a functional option for configuring EncryptedStringValueEncoderDecoder.

func WithDebug

func WithDebug(debug bool) Option

WithDebug sets debug mode.

Jump to

Keyboard shortcuts

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