Documentation
¶
Overview ¶
Package plugin implements the age plugin identity and recipient types for the keystore plugin.
Index ¶
Constants ¶
const ( // PluginName is the name of this plugin. PluginName = "keystore" // RecipientHRP is the human-readable part for keystore recipients. RecipientHRP = "age1keystore" // IdentityHRP is the human-readable part for keystore identities. IdentityHRP = "age-plugin-keystore-" // KeystoreStanzaType is the stanza type for keystore recipients. KeystoreStanzaType = "keystore" )
Variables ¶
This section is empty.
Functions ¶
func GenerateIdentity ¶
GenerateIdentity generates a new X25519 key pair and stores it in the keystore. Returns the identity and recipient.
Types ¶
type Identity ¶
type Identity struct {
// contains filtered or unexported fields
}
Identity represents a keystore identity that retrieves the private key from the GNOME Keyring.
func GenerateSeparateIdentity ¶ added in v1.1.0
GenerateSeparateIdentity generates a new X25519 key pair and stores it in the keystore. Unlike GenerateIdentity, this returns a standard age public key (age1...) instead of a keystore recipient (age1keystore1...). This allows the public key to be used independently of the plugin for encryption.
func NewIdentity ¶
NewIdentity creates a new keystore identity from a key ID.
func ParseIdentity ¶
ParseIdentity parses a keystore identity string.
func (*Identity) String ¶
String returns the bech32-encoded identity string. Panics if encoding fails (should never happen with valid keyID).
type Recipient ¶
type Recipient struct {
// contains filtered or unexported fields
}
Recipient represents a keystore recipient.
func NewRecipientFromPublicKey ¶
func NewRecipientFromPublicKey(keyID string, publicKey *age.X25519Recipient) *Recipient
NewRecipientFromPublicKey creates a new recipient from a keyID and public key.
func ParseRecipient ¶
ParseRecipient parses a keystore recipient string.