pub enum KeyParams {
    Rsa {
        size: RsaKeyBits,
        scheme: RsaScheme,
        pub_exponent: RsaExponent,
    },
    Ecc {
        curve: EccCurve,
        scheme: EccScheme,
    },
}
Expand description

Parameters for the kinds of keys supported by the context

Variants

Rsa

Fields

size: RsaKeyBits

Size of key in bits

Can only be one of: 1024, 2048, 3072 or 4096

scheme: RsaScheme

Asymmetric scheme to be used with the key

pub_exponent: RsaExponent

Public exponent of the key

If set to 0, it will default to 2^16 - 1

Ecc

Fields

curve: EccCurve

Curve that the key will be based on

scheme: EccScheme

Asymmetric scheme to be used with the key

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Drops the content pointed by this pointer and frees it. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.