pub enum MurkIdentity {
Age(Identity),
Ssh(Identity),
Plugin {
identity: Identity,
pubkey: String,
},
}Expand description
An identity that can decrypt age-encrypted data.
Plugin identities (AGE-PLUGIN-<NAME>-1...) carry the recipient pubkey
alongside the pointer so pubkey_string does not require spawning the
plugin binary. Decryption spawns age-plugin-<name> via
IdentityPluginV1 to access the hardware-backed key.
Variants§
Implementations§
Source§impl MurkIdentity
impl MurkIdentity
Sourcepub fn pubkey_string(&self) -> Result<String, CryptoError>
pub fn pubkey_string(&self) -> Result<String, CryptoError>
Return the public key string for this identity.
For age keys: age1.... For SSH keys: ssh-ed25519 AAAA... or
ssh-rsa AAAA.... For plugin keys: the age1<plugin>1... recipient
that was parsed from the identity file’s # public key: header.
Sourcepub fn plugin_name(&self) -> Option<&str>
pub fn plugin_name(&self) -> Option<&str>
Plugin name (e.g. "yubikey", "se") if this is a plugin identity.
Trait Implementations§
Source§impl Clone for MurkIdentity
impl Clone for MurkIdentity
Source§fn clone(&self) -> MurkIdentity
fn clone(&self) -> MurkIdentity
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MurkIdentity
impl RefUnwindSafe for MurkIdentity
impl Send for MurkIdentity
impl Sync for MurkIdentity
impl Unpin for MurkIdentity
impl UnsafeUnpin for MurkIdentity
impl UnwindSafe for MurkIdentity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more