age

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KeyFileName is the name of the age private key file.
	KeyFileName = "age.key"
	// KeyEnvVar is the environment variable name for the age key.
	KeyEnvVar = "SOPS_AGE_KEY"
)

Variables

This section is empty.

Functions

func NewIdentity

func NewIdentity() (*age.X25519Identity, error)

NewIdentity is a helper function for generating age.X25519Identity.

func ReadIdentity

func ReadIdentity() (*age.X25519Identity, error)

ReadIdentity returns the age identity key from environment or file.

Checks in order: 1. SOPS_AGE_KEY environment variable. 2. ~/.config/webkit/age.key (local dev)

func WritePrivateKey

func WritePrivateKey(key string) error

WritePrivateKey writes an age private key to the config directory.

Types

type Provider

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

Provider implements the SOPS Provider interface for age encryption, keys are lazy loaded.

func NewProvider

func NewProvider() (*Provider, error)

NewProvider creates a new age provider by reading keys.

Returns an error if it couldn't extract/read public and private keys.

func (*Provider) DecryptArgs

func (p *Provider) DecryptArgs() ([]string, error)

func (*Provider) EncryptArgs

func (p *Provider) EncryptArgs() ([]string, error)

func (*Provider) Environment

func (p *Provider) Environment() map[string]string

Jump to

Keyboard shortcuts

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