pub struct RSA2048Keys(/* private fields */);
Implementations§
Source§impl RSA2048Keys
impl RSA2048Keys
pub const fn new() -> RSA2048Keys
Trait Implementations§
Source§impl PubKey for RSA2048Keys
impl PubKey for RSA2048Keys
Source§impl PubPrivKey for RSA2048Keys
impl PubPrivKey for RSA2048Keys
Source§impl RsaKey for RSA2048Keys
impl RsaKey for RSA2048Keys
Source§fn map_modulus(&self, closure: &dyn Fn(&[u8])) -> Option<()>
fn map_modulus(&self, closure: &dyn Fn(&[u8])) -> Option<()>
Run the specified closure over the modulus, if it exists
The modulus is returned MSB (big endian)
Returns
Some()
if the key exists and the closure was called,
otherwise returns None
.Source§fn take_modulus(&self) -> Option<&'static [u8]>
fn take_modulus(&self) -> Option<&'static [u8]>
The the modulus if it exists.
The modulus is returned MSB (big endian)
Returns
Some()
if the key exists otherwise returns None
.
The modulus can be returned by calling import_public_key()
with
the output of this function.Source§fn public_exponent(&self) -> Option<u32>
fn public_exponent(&self) -> Option<u32>
Returns the public exponent of the key pair if it exists
Source§impl RsaPrivKey for RSA2048Keys
impl RsaPrivKey for RSA2048Keys
Source§fn map_exponent(&self, closure: &dyn Fn(&[u8])) -> Option<()>
fn map_exponent(&self, closure: &dyn Fn(&[u8])) -> Option<()>
Returns the specified closure over the private exponent, if it exists
The exponent is returned MSB (big endian)
Returns
Some()
if the key exists and the closure was called,
otherwise returns None
.Source§fn take_exponent(&self) -> Option<&'static [u8]>
fn take_exponent(&self) -> Option<&'static [u8]>
The the private exponent if it exists.
The exponent is returned MSB (big endian)
Returns
Some()
if the key exists otherwise returns None
.
The exponent can be returned by calling import_private_key()
with
the output of this function.Auto Trait Implementations§
impl !Freeze for RSA2048Keys
impl !RefUnwindSafe for RSA2048Keys
impl Send for RSA2048Keys
impl !Sync for RSA2048Keys
impl Unpin for RSA2048Keys
impl !UnwindSafe for RSA2048Keys
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