Trait age::Recipient

source ·
pub trait Recipient {
    // Required method
    fn wrap_file_key(
        &self,
        file_key: &FileKey
    ) -> Result<Vec<Stanza>, EncryptError>;
}
Expand description

A public key or other value that can wrap an opaque file key to a recipient stanza.

Implementations of this trait might represent more than one recipient.

Required Methods§

source

fn wrap_file_key(&self, file_key: &FileKey) -> Result<Vec<Stanza>, EncryptError>

Wraps the given file key, returning stanzas to be placed in an age file header.

Implementations MUST NOT return more than one stanza per “actual recipient”.

This method is part of the Recipient trait to expose age’s one joint for external implementations. You should not need to call this directly; instead, pass recipients to Encryptor::with_recipients.

Implementors§

source§

impl Recipient for age::ssh::Recipient

Available on crate feature ssh only.
source§

impl Recipient for age::x25519::Recipient

source§

impl<C: Callbacks> Recipient for RecipientPluginV1<C>

Available on crate feature plugin only.