[][src]Struct age::Encryptor

pub struct Encryptor(_);

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]

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

impl !Send for Encryptor

impl !Sync for Encryptor

impl Unpin for Encryptor

impl !UnwindSafe for Encryptor

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,