win_crypto_ng::asymmetric::builder

Struct BuilderWithKeyBits

Source
pub struct BuilderWithKeyBits<A: Algorithm, C: KeyConstraint = NoConstraint> { /* private fields */ }
Expand description

Builder type with key length provided in bits.

Implementations§

Source§

impl BuilderWithKeyBits<AsymmetricAlgorithmId>

Source

pub fn with_params( self, params: BuilderOptions, ) -> BuilderWithParams<AsymmetricAlgorithmId, BuilderOptions>

Supply additional algorithm-specific parameters to generate a key with.

Source§

impl BuilderWithKeyBits<Dh>

Source

pub fn with_params(self, params: DhParams) -> BuilderWithParams<Dh, DhParams>

Supply additional algorithm-specific parameters to generate a key with.

Source§

impl<C: Curve> BuilderWithKeyBits<Ecdh<C>>

Source

pub fn with_params(self, params: ()) -> BuilderWithParams<Ecdh<C>>

Supply additional algorithm-specific parameters to generate a key with.

Is a no-op.

Source§

impl<C: Curve> BuilderWithKeyBits<Ecdsa<C>>

Source

pub fn with_params(self, params: ()) -> BuilderWithParams<Ecdsa<C>>

Supply additional algorithm-specific parameters to generate a key with.

Is a no-op.

Source§

impl BuilderWithKeyBits<Dsa>

Source

pub fn with_params(self, params: DsaParams) -> BuilderWithParams<Dsa, DsaParams>

Supply additional algorithm-specific parameters to generate a key with.

Source§

impl BuilderWithKeyBits<Dsa, KeyBitsGte512Lte1024>

Source

pub fn with_params( self, params: DsaParamsV1, ) -> BuilderWithParams<Dsa, DsaParamsV1>

Supply additional algorithm-specific parameters to generate a key with.

Source§

impl BuilderWithKeyBits<Dsa, KeyBitsGt1024Lte3072>

Source

pub fn with_params( self, params: DsaParamsV2, ) -> BuilderWithParams<Dsa, DsaParamsV2>

Supply additional algorithm-specific parameters to generate a key with.

Source§

impl BuilderWithKeyBits<AsymmetricAlgorithmId>

Source

pub fn build(self) -> Result<AsymmetricKey<AsymmetricAlgorithmId, Private>>

Generate the final key.

Source§

impl BuilderWithKeyBits<Rsa>

Source

pub fn build(self) -> Result<AsymmetricKey<Rsa, Private>>

Generate the final key.

Source§

impl BuilderWithKeyBits<Dsa>

Source

pub fn build(self) -> Result<AsymmetricKey<Dsa, Private>>

Generate the final key.

Auto Trait Implementations§

§

impl<A, C> Freeze for BuilderWithKeyBits<A, C>
where A: Freeze,

§

impl<A, C> RefUnwindSafe for BuilderWithKeyBits<A, C>

§

impl<A, C> Send for BuilderWithKeyBits<A, C>
where A: Send, C: Send,

§

impl<A, C> Sync for BuilderWithKeyBits<A, C>
where A: Sync, C: Sync,

§

impl<A, C> Unpin for BuilderWithKeyBits<A, C>
where A: Unpin, C: Unpin,

§

impl<A, C> UnwindSafe for BuilderWithKeyBits<A, C>
where A: UnwindSafe, C: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.