pub struct RsaPrivateKey { /* private fields */ }Available on crate feature
alloc only.Expand description
RSA private key.
Implementations§
Source§impl RsaPrivateKey
impl RsaPrivateKey
Sourcepub fn new(d: Mpint, iqmp: Mpint, p: Mpint, q: Mpint) -> Result<Self>
pub fn new(d: Mpint, iqmp: Mpint, p: Mpint, q: Mpint) -> Result<Self>
Create a new RSA private key with the following components:
d: RSA private exponent.iqmp: CRT coefficient:(inverse of q) mod p.p: First prime factor ofn.q: Second prime factor ofn.
§Errors
Returns Error::FormatEncoding if any of the provided values are negative.
Trait Implementations§
Source§impl Clone for RsaPrivateKey
impl Clone for RsaPrivateKey
Source§fn clone(&self) -> RsaPrivateKey
fn clone(&self) -> RsaPrivateKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CtEq for RsaPrivateKey
impl CtEq for RsaPrivateKey
Source§impl Debug for RsaPrivateKey
impl Debug for RsaPrivateKey
Source§impl Decode for RsaPrivateKey
impl Decode for RsaPrivateKey
Source§impl Drop for RsaPrivateKey
impl Drop for RsaPrivateKey
Source§impl Encode for RsaPrivateKey
impl Encode for RsaPrivateKey
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. Read more
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. Read moreSource§impl PartialEq for RsaPrivateKey
impl PartialEq for RsaPrivateKey
impl Eq for RsaPrivateKey
Auto Trait Implementations§
impl Freeze for RsaPrivateKey
impl RefUnwindSafe for RsaPrivateKey
impl Send for RsaPrivateKey
impl Sync for RsaPrivateKey
impl Unpin for RsaPrivateKey
impl UnsafeUnpin 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