Documentation
¶
Overview ¶
Package sshage encrypts and decrypts streams with age, keyed by SSH keys. Encrypt seals data from a reader to a writer for a set of age recipients (an SSH public key becomes a recipient via filippo.io/age/agessh); Decrypt reverses it with age identities; ParseIdentities loads age identities from an SSH private-key file. Every failure carries a sentinel (ErrEncrypt, ErrDecrypt, ErrOpenFile, or ErrParseIdentity) recoverable with errors.Is.
Index ¶
Constants ¶
const ( // ErrEncrypt is the leading sentinel wrapped when age encryption fails. ErrEncrypt errs.Const = "failed to encrypt" // ErrDecrypt is the leading sentinel wrapped when age decryption fails. ErrDecrypt errs.Const = "failed to decrypt" // ErrOpenFile is the leading sentinel wrapped when an identity file cannot // be read. ErrOpenFile errs.Const = "failed to open file" // ErrParseIdentity is the leading sentinel wrapped when an SSH private key // cannot be parsed into an age identity. ErrParseIdentity errs.Const = "failed to parse identity" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Identities ¶
Identities is the set of age identities Decrypt attempts to unseal with.
func ParseIdentities ¶
func ParseIdentities(path IdentityFile) (Identities, error)
ParseIdentities reads an SSH private key file and returns age identities.
type IdentityFile ¶
type IdentityFile string
IdentityFile is the path to an SSH private-key file that ParseIdentities reads age identities from.
type Recipients ¶
Recipients is the set of age recipients data is sealed to by Encrypt.