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.
pub fn from_reader<'a, R: Read + Send + Sync + 'a>(
r: R
) -> Result<AutocryptSetupMessageParser<'a>>
pub fn from_reader<'a, R: Read + Send + Sync + 'a>(
r: R
) -> Result<AutocryptSetupMessageParser<'a>>
Parses the autocrypt setup message in r
.
passcode
is the passcode used to protect the message.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.