Skip to main content

parse_identity

Function parse_identity 

Source
pub fn parse_identity(input: &str) -> Result<MurkIdentity, CryptoError>
Expand description

Parse a secret key or identity-file contents into a MurkIdentity.

Accepts three shapes:

  • A bare age secret key (AGE-SECRET-KEY-1...)
  • An SSH PEM-encoded private key (unencrypted only; encrypted keys are rejected)
  • A plugin identity file — multi-line text with a recipient header (# Recipient: age1... or # public key: age1...) followed by an AGE-PLUGIN-<NAME>-1... pointer, as produced by tools like age-plugin-yubikey --identity

Comments and blank lines are permitted anywhere.