pub struct DsaKeypair {
pub public: DsaPublicKey,
pub private: DsaPrivateKey,
}
Available on crate feature
alloc
only.Expand description
Digital Signature Algorithm (DSA) private/public keypair.
Fields§
§public: DsaPublicKey
Public key.
private: DsaPrivateKey
Private key.
Implementations§
source§impl DsaKeypair
impl DsaKeypair
sourcepub fn random(rng: &mut impl CryptoRngCore) -> Result<Self>
Available on crate features dsa
and rand_core
only.
pub fn random(rng: &mut impl CryptoRngCore) -> Result<Self>
dsa
and rand_core
only.Generate a random DSA private key.
Trait Implementations§
source§impl Clone for DsaKeypair
impl Clone for DsaKeypair
source§fn clone(&self) -> DsaKeypair
fn clone(&self) -> DsaKeypair
Returns a copy 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 ConstantTimeEq for DsaKeypair
impl ConstantTimeEq for DsaKeypair
source§impl Debug for DsaKeypair
impl Debug for DsaKeypair
source§impl Decode for DsaKeypair
impl Decode for DsaKeypair
source§impl Encode for DsaKeypair
impl Encode for DsaKeypair
source§fn encoded_len(&self) -> Result<usize>
fn encoded_len(&self) -> Result<usize>
Get the length of this type encoded in bytes, prior to Base64 encoding.
source§fn encode(&self, writer: &mut impl Writer) -> Result<()>
fn encode(&self, writer: &mut impl Writer) -> Result<()>
Encode this value using the provided
Writer
.source§fn encoded_len_prefixed(&self) -> Result<usize, Error>
fn encoded_len_prefixed(&self) -> Result<usize, Error>
Return the length of this type after encoding when prepended with a
uint32
length prefix.source§fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value, first prepending a
uint32
length prefix
set to Encode::encoded_len
.source§impl From<&DsaKeypair> for DsaPublicKey
impl From<&DsaKeypair> for DsaPublicKey
source§fn from(keypair: &DsaKeypair) -> DsaPublicKey
fn from(keypair: &DsaKeypair) -> DsaPublicKey
Converts to this type from the input type.
source§impl From<DsaKeypair> for DsaPublicKey
impl From<DsaKeypair> for DsaPublicKey
source§fn from(keypair: DsaKeypair) -> DsaPublicKey
fn from(keypair: DsaKeypair) -> DsaPublicKey
Converts to this type from the input type.
source§impl From<DsaKeypair> for KeypairData
impl From<DsaKeypair> for KeypairData
source§fn from(keypair: DsaKeypair) -> KeypairData
fn from(keypair: DsaKeypair) -> KeypairData
Converts to this type from the input type.
source§impl From<DsaKeypair> for PrivateKey
impl From<DsaKeypair> for PrivateKey
source§fn from(keypair: DsaKeypair) -> PrivateKey
fn from(keypair: DsaKeypair) -> PrivateKey
Converts to this type from the input type.
source§impl PartialEq for DsaKeypair
impl PartialEq for DsaKeypair
source§impl Signer<Signature> for DsaKeypair
Available on crate feature dsa
only.
impl Signer<Signature> for DsaKeypair
Available on crate feature
dsa
only.source§impl TryFrom<&DsaKeypair> for SigningKey
Available on crate feature dsa
only.
impl TryFrom<&DsaKeypair> for SigningKey
Available on crate feature
dsa
only.source§fn try_from(key: &DsaKeypair) -> Result<SigningKey>
fn try_from(key: &DsaKeypair) -> Result<SigningKey>
Performs the conversion.
source§impl TryFrom<&SigningKey> for DsaKeypair
Available on crate feature dsa
only.
impl TryFrom<&SigningKey> for DsaKeypair
Available on crate feature
dsa
only.source§fn try_from(key: &SigningKey) -> Result<DsaKeypair>
fn try_from(key: &SigningKey) -> Result<DsaKeypair>
Performs the conversion.
source§impl TryFrom<DsaKeypair> for SigningKey
Available on crate feature dsa
only.
impl TryFrom<DsaKeypair> for SigningKey
Available on crate feature
dsa
only.source§fn try_from(key: DsaKeypair) -> Result<SigningKey>
fn try_from(key: DsaKeypair) -> Result<SigningKey>
Performs the conversion.
source§impl TryFrom<SigningKey> for DsaKeypair
Available on crate feature dsa
only.
impl TryFrom<SigningKey> for DsaKeypair
Available on crate feature
dsa
only.source§fn try_from(key: SigningKey) -> Result<DsaKeypair>
fn try_from(key: SigningKey) -> Result<DsaKeypair>
Performs the conversion.
impl Eq for DsaKeypair
Auto Trait Implementations§
impl Freeze for DsaKeypair
impl RefUnwindSafe for DsaKeypair
impl Send for DsaKeypair
impl Sync for DsaKeypair
impl Unpin for DsaKeypair
impl UnwindSafe for DsaKeypair
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)