crypto

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptEntry

func DecryptEntry(identitiesPath, passwordStore, name string) (string, error)

DecryptEntry decrypts a password entry from the store using identities from the identities file.

func DecryptIdentities

func DecryptIdentities(identitiesPath string) (string, error)

DecryptIdentities decrypts the identities file using a password provided by the user.

func EntryFile

func EntryFile(passwordStore, name string) (string, error)

EntryFile constructs the full file path for a given entry name in the store. It also checks the entry name for invalid characters and ensures the path is within the store.

func ParseIdentities added in v0.15.0

func ParseIdentities(identityData string) ([]age.Identity, error)

ParseIdentities parses a string containing age identities and/or SSH private keys. It supports both native age X25519 identities and PEM-encoded SSH private keys.

func ParseRecipients

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

ParseRecipients parses the entire text of an recipients file, supporting both X25519 and SSH public key formats.

func SaveEntry

func SaveEntry(recipientsPath, passwordStore, name, password string) error

SaveEntry encrypts the provided password and saves it to a file in the password store.

func WrapDecrypt

func WrapDecrypt(r io.Reader, identities ...age.Identity) (io.Reader, error)

WrapDecrypt returns a reader that can decrypt data from the input reader. It automatically detects whether the input is in the armored or binary age format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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