Struct sequoia_autocrypt::AutocryptSetupMessage[][src]

pub struct AutocryptSetupMessage { /* fields omitted */ }
Expand description

Holds an Autocrypt Setup Message.

An Autocrypt Setup Message is used to transfer a private key from one device to another.

Implementations

Creates a new Autocrypt Setup Message for the specified Cert.

You can set the prefer_encrypt setting, which defaults to “nopreference”, using set_prefer_encrypt.

Note: this generates a random passcode. To retrieve the passcode, use the passcode method.

To decode an Autocrypt Setup Message, use the from_bytes or from_reader methods.

Sets the prefer encrypt header.

Returns the prefer encrypt header.

Sets the “Passcode-Format” header.

Returns the “Passcode-Format” header.

Sets the passcode.

Returns the ASM’s passcode.

If the passcode has not yet been generated, this returns None.

Sets the “Passcode-Begin” header.

Returns the “Passcode-Begin” header.

Generates the Autocrypt Setup Message.

The message is written to w.

Parses the autocrypt setup message in r.

passcode is the passcode used to protect the message.

Parses the autocrypt setup message in r.

passcode is the passcode used to protect the message.

Returns the Cert consuming the AutocryptSetupMessage in the process.

Trait Implementations

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

Should always be Self

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.