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: Mpint
RSA public exponent.
n: Mpint
RSA 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, 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<&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 Hash for RsaPublicKey
impl Hash for RsaPublicKey
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 for RsaPublicKey
impl PartialEq for RsaPublicKey
source§impl PartialOrd for RsaPublicKey
impl PartialOrd for RsaPublicKey
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<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.impl Eq for RsaPublicKey
impl StructuralPartialEq for RsaPublicKey
Auto Trait Implementations§
impl Freeze for RsaPublicKey
impl RefUnwindSafe for RsaPublicKey
impl Send for RsaPublicKey
impl Sync for RsaPublicKey
impl Unpin for RsaPublicKey
impl UnwindSafe for RsaPublicKey
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
)