Struct x509_certificate::rfc3447::RsaPrivateKey
source · pub struct RsaPrivateKey {
pub version: Unsigned,
pub n: Unsigned,
pub e: Unsigned,
pub d: Unsigned,
pub p: Unsigned,
pub q: Unsigned,
pub dp: Unsigned,
pub dq: Unsigned,
pub q_inv: Unsigned,
pub other_prime_infos: Option<OtherPrimeInfos>,
}
Expand description
An RSA private key.
RSAPrivateKey ::= SEQUENCE {
version Version,
modulus INTEGER, -- n
publicExponent INTEGER, -- e
privateExponent INTEGER, -- d
prime1 INTEGER, -- p
prime2 INTEGER, -- q
exponent1 INTEGER, -- d mod (p-1)
exponent2 INTEGER, -- d mod (q-1)
coefficient INTEGER, -- (inverse of q) mod p
otherPrimeInfos OtherPrimeInfos OPTIONAL
}
Fields§
§version: Unsigned
§n: Unsigned
§e: Unsigned
§d: Unsigned
§p: Unsigned
§q: Unsigned
§dp: Unsigned
§dq: Unsigned
§q_inv: Unsigned
§other_prime_infos: Option<OtherPrimeInfos>
Implementations§
source§impl RsaPrivateKey
impl RsaPrivateKey
pub fn take_from<S: Source>( cons: &mut Constructed<'_, S> ) -> Result<Self, DecodeError<S::Error>>
pub fn encode_ref(&self) -> impl Values + '_
Trait Implementations§
source§impl Clone for RsaPrivateKey
impl Clone for RsaPrivateKey
source§fn clone(&self) -> RsaPrivateKey
fn clone(&self) -> RsaPrivateKey
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 RsaPrivateKey
impl Debug for RsaPrivateKey
source§impl Values for RsaPrivateKey
impl Values for RsaPrivateKey
source§fn encoded_len(&self, mode: Mode) -> usize
fn encoded_len(&self, mode: Mode) -> usize
Returns the length of the encoded values for the given mode.
source§fn write_encoded<W: Write>(
&self,
mode: Mode,
target: &mut W
) -> Result<(), Error>
fn write_encoded<W: Write>( &self, mode: Mode, target: &mut W ) -> Result<(), Error>
Encodes the values in the given mode and writes them to
target
.source§fn explicit(self, tag: Tag) -> Constructed<Self>where
Self: Sized,
fn explicit(self, tag: Tag) -> Constructed<Self>where Self: Sized,
Converts the encoder into one with an explicit tag.
source§fn to_captured(&self, mode: Mode) -> Captured
fn to_captured(&self, mode: Mode) -> Captured
Captures the encoded values in the given mode.
Auto Trait Implementations§
impl RefUnwindSafe for RsaPrivateKey
impl Send for RsaPrivateKey
impl Sync for RsaPrivateKey
impl Unpin for RsaPrivateKey
impl UnwindSafe for RsaPrivateKey
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