[][src]Struct sequoia_openpgp::tpk::TPKBuilder

pub struct TPKBuilder { /* fields omitted */ }

Simplifies generation of Keys.

Builder to generate complex TPK hierarchies with multiple user IDs.

Methods

impl TPKBuilder[src]

pub fn autocrypt<V>(_: V) -> Self where
    V: Into<Option<Autocrypt>>, 
[src]

Generates a key compliant to Autocrypt. If no version is given the latest one is used.

pub fn set_cipher_suite(self, cs: CipherSuite) -> Self[src]

Sets the encryption and signature algorithms for primary and all subkeys.

pub fn add_userid(self, uid: &str) -> Self[src]

Adds a new user ID. The first user ID added will be the primary user ID.

pub fn add_signing_subkey(self) -> Self[src]

Adds a signing capable subkey.

pub fn add_encryption_subkey(self) -> Self[src]

Adds an encryption capable subkey.

pub fn add_certification_subkey(self) -> Self[src]

Adds an certification capable subkey.

pub fn add_subkey(self, flags: KeyFlags) -> Self[src]

Adds a custom subkey

pub fn primary_keyflags(self, flags: KeyFlags) -> Self[src]

Sets the capabilities of the primary key. The function automatically makes the primary key certification capable if subkeys are added.

pub fn generate(self) -> Result<(TPK, Signature)>[src]

Generates the actual TPK.

Trait Implementations

impl Default for TPKBuilder[src]

impl Clone for TPKBuilder[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for TPKBuilder[src]

Auto Trait Implementations

impl Send for TPKBuilder

impl Sync for TPKBuilder

Blanket Implementations

impl<T> From for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.