pub enum Identity {
    Unencrypted(UnencryptedKey),
    Encrypted(EncryptedKey),
    Unsupported(UnsupportedKey),
}
Available on crate feature ssh only.
Expand description

An SSH private key for decrypting an age file.

Variants

Unencrypted(UnencryptedKey)

An unencrypted key.

Encrypted(EncryptedKey)

An encrypted key.

Unsupported(UnsupportedKey)

A key that we know how to parse, but that we do not support.

Implementations

Parses one or more identities from a buffered input containing valid UTF-8.

filename is the path to the file that the input is reading from, if any.

Wraps this identity with the provided callbacks, so that if this is an encrypted identity, it can potentially be decrypted.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Attempts to unwrap the given stanza with this identity. Read more
Attempts to unwrap any of the given stanzas, which are assumed to come from the same age file header, and therefore contain the same file key. Read more
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.