identity

package
v0.1.0-dev.20260129030150 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package identity provides age identity loading for writ.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateIdentity

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

GenerateIdentity creates a new age identity and returns the key.

func IdentityToRecipient

func IdentityToRecipient(identity *age.X25519Identity) string

IdentityToRecipient returns the public key (recipient) for an identity.

func LoadIdentities

func LoadIdentities() ([]age.Identity, error)

LoadIdentities loads age identities from standard locations. Searches in order:

  1. AGE_IDENTITY environment variable (comma-separated paths)
  2. ~/.config/age/keys.txt
  3. ~/.ssh/id_ed25519, ~/.ssh/id_rsa (SSH keys)

func LoadIdentitiesFromPaths

func LoadIdentitiesFromPaths(paths []string) ([]age.Identity, error)

LoadIdentitiesFromPaths loads identities from specific paths.

func ParseRecipients

func ParseRecipients(recipients []string) ([]age.Recipient, error)

ParseRecipients parses age recipient strings (public keys).

Types

This section is empty.

Jump to

Keyboard shortcuts

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