Struct age::Encryptor [−][src]
Encryptor for creating an age file.
Implementations
impl Encryptor
[src]
pub fn with_recipients(recipients: Vec<Box<dyn Recipient>>) -> Self
[src]
Returns an Encryptor
that will create an age file encrypted to a list of
recipients.
pub fn with_user_passphrase(passphrase: SecretString) -> Self
[src]
Returns an Encryptor
that will create an age file encrypted with a passphrase.
This API should only be used with a passphrase that was provided by (or generated
for) a human. For programmatic use cases, instead generate an x25519::Identity
and then use Encryptor::with_recipients
.
pub fn wrap_output<W: Write>(
self,
output: W
) -> Result<StreamWriter<W>, EncryptError>
[src]
self,
output: W
) -> Result<StreamWriter<W>, EncryptError>
Creates a wrapper around a writer that will encrypt its input.
Returns errors from the underlying writer while writing the header.
You MUST call StreamWriter::finish
when you are done writing, in order to
finish the encryption process. Failing to call StreamWriter::finish
will
result in a truncated file that will fail to decrypt.
Auto Trait Implementations
impl !RefUnwindSafe for Encryptor
[src]
impl !Send for Encryptor
[src]
impl !Sync for Encryptor
[src]
impl Unpin for Encryptor
[src]
impl !UnwindSafe for Encryptor
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,