Extract public key (recipient) from existing age key file

Description

Read an existing age key file and extract the public key component that can be used as a recipient identifier for encryption.

Usage

key_recipient(keyfile = NULL)

Arguments

keyfile Character string, path to an existing age key file.

Value

A lockbox_key object containing:

  • $public: The public key (age recipient identifier)

Examples

library("lockbox")

# Extract public key from existing key file
recipient <- key_recipient("my_identity.key")
print(recipient$public)