Struct ssh_key::public::RsaPublicKey
source · pub struct RsaPublicKey {
pub e: Mpint,
pub n: Mpint,
}Available on crate feature
alloc only.Expand description
RSA public key.
Described in RFC4253 § 6.6.
Fields§
§e: MpintRSA public exponent.
n: MpintRSA modulus.
Trait Implementations§
source§impl Clone for RsaPublicKey
impl Clone for RsaPublicKey
source§fn clone(&self) -> RsaPublicKey
fn clone(&self) -> RsaPublicKey
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 Debug for RsaPublicKey
impl Debug for RsaPublicKey
source§impl Decode for RsaPublicKey
impl Decode for RsaPublicKey
source§impl Encode for RsaPublicKey
impl Encode for RsaPublicKey
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, Self::Error>
fn encoded_len_prefixed(&self) -> Result<usize, Self::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<(), Self::Error>
fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Self::Error>
Encode this value, first prepending a
uint32 length prefix
set to Encode::encoded_len.source§impl From<&RsaKeypair> for RsaPublicKey
impl From<&RsaKeypair> for RsaPublicKey
source§fn from(keypair: &RsaKeypair) -> RsaPublicKey
fn from(keypair: &RsaKeypair) -> RsaPublicKey
Converts to this type from the input type.
source§impl From<RsaKeypair> for RsaPublicKey
impl From<RsaKeypair> for RsaPublicKey
source§fn from(keypair: RsaKeypair) -> RsaPublicKey
fn from(keypair: RsaKeypair) -> RsaPublicKey
Converts to this type from the input type.
source§impl From<RsaPublicKey> for KeyData
impl From<RsaPublicKey> for KeyData
source§fn from(public_key: RsaPublicKey) -> KeyData
fn from(public_key: RsaPublicKey) -> KeyData
Converts to this type from the input type.
source§impl From<RsaPublicKey> for PublicKey
impl From<RsaPublicKey> for PublicKey
source§fn from(public_key: RsaPublicKey) -> PublicKey
fn from(public_key: RsaPublicKey) -> PublicKey
Converts to this type from the input type.
source§impl Ord for RsaPublicKey
impl Ord for RsaPublicKey
source§fn cmp(&self, other: &RsaPublicKey) -> Ordering
fn cmp(&self, other: &RsaPublicKey) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<RsaPublicKey> for RsaPublicKey
impl PartialEq<RsaPublicKey> for RsaPublicKey
source§fn eq(&self, other: &RsaPublicKey) -> bool
fn eq(&self, other: &RsaPublicKey) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<RsaPublicKey> for RsaPublicKey
impl PartialOrd<RsaPublicKey> for RsaPublicKey
source§fn partial_cmp(&self, other: &RsaPublicKey) -> Option<Ordering>
fn partial_cmp(&self, other: &RsaPublicKey) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl TryFrom<&RsaPublicKey> for RsaPublicKey
Available on crate feature rsa only.
impl TryFrom<&RsaPublicKey> for RsaPublicKey
Available on crate feature
rsa only.source§fn try_from(key: &RsaPublicKey) -> Result<RsaPublicKey>
fn try_from(key: &RsaPublicKey) -> Result<RsaPublicKey>
Performs the conversion.
source§impl TryFrom<&RsaPublicKey> for RsaPublicKey
Available on crate feature rsa only.
impl TryFrom<&RsaPublicKey> for RsaPublicKey
Available on crate feature
rsa only.source§fn try_from(key: &RsaPublicKey) -> Result<RsaPublicKey>
fn try_from(key: &RsaPublicKey) -> Result<RsaPublicKey>
Performs the conversion.
source§impl<D> TryFrom<&RsaPublicKey> for VerifyingKey<D>where
D: Digest + AssociatedOid,
Available on crate feature rsa only.
impl<D> TryFrom<&RsaPublicKey> for VerifyingKey<D>where D: Digest + AssociatedOid,
Available on crate feature
rsa only.source§fn try_from(key: &RsaPublicKey) -> Result<VerifyingKey<D>>
fn try_from(key: &RsaPublicKey) -> Result<VerifyingKey<D>>
Performs the conversion.
source§impl TryFrom<RsaPublicKey> for RsaPublicKey
Available on crate feature rsa only.
impl TryFrom<RsaPublicKey> for RsaPublicKey
Available on crate feature
rsa only.source§fn try_from(key: RsaPublicKey) -> Result<RsaPublicKey>
fn try_from(key: RsaPublicKey) -> Result<RsaPublicKey>
Performs the conversion.
source§impl TryFrom<RsaPublicKey> for RsaPublicKey
Available on crate feature rsa only.
impl TryFrom<RsaPublicKey> for RsaPublicKey
Available on crate feature
rsa only.source§fn try_from(key: RsaPublicKey) -> Result<RsaPublicKey>
fn try_from(key: RsaPublicKey) -> Result<RsaPublicKey>
Performs the conversion.
source§impl Verifier<Signature> for RsaPublicKey
Available on crate feature rsa only.
impl Verifier<Signature> for RsaPublicKey
Available on crate feature
rsa only.