pub struct Components { /* private fields */ }Expand description
The common components of an DSA keypair
(the prime p, quotient q and generator g)
Implementations§
Source§impl Components
impl Components
Sourcepub fn from_components(p: BigUint, q: BigUint, g: BigUint) -> Result<Self>
pub fn from_components(p: BigUint, q: BigUint, g: BigUint) -> Result<Self>
Construct the common components container from its inner values (p, q and g)
Sourcepub fn generate(rng: &mut impl CryptoRngCore, key_size: KeySize) -> Self
pub fn generate(rng: &mut impl CryptoRngCore, key_size: KeySize) -> Self
Generate a new pair of common components
Trait Implementations§
Source§impl Clone for Components
impl Clone for Components
Source§fn clone(&self) -> Components
fn clone(&self) -> Components
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Components
impl Debug for Components
Source§impl<'a> DecodeValue<'a> for Components
impl<'a> DecodeValue<'a> for Components
Source§impl EncodeValue for Components
impl EncodeValue for Components
Source§impl PartialEq for Components
impl PartialEq for Components
Source§impl PartialOrd for Components
impl PartialOrd for Components
impl<'a> Sequence<'a> for Components
impl StructuralPartialEq for Components
Auto Trait Implementations§
impl Freeze for Components
impl RefUnwindSafe for Components
impl Send for Components
impl Sync for Components
impl Unpin for Components
impl UnwindSafe for Components
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
Source§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere
T: EncodeValue + Tagged,
Source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
Source§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided Writer.
Source§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.