pub trait RsaKeyMut: PubKeyMut {
// Required methods
fn map_modulus(&self, closure: &dyn Fn(&mut [u8])) -> Option<()>;
fn take_modulus(&self) -> Option<&'static mut [u8]>;
fn public_exponent(&self) -> Option<u32>;
}
Required Methods§
Sourcefn map_modulus(&self, closure: &dyn Fn(&mut [u8])) -> Option<()>
fn map_modulus(&self, closure: &dyn Fn(&mut [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
.
Sourcefn take_modulus(&self) -> Option<&'static mut [u8]>
fn take_modulus(&self) -> Option<&'static mut [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.
Sourcefn public_exponent(&self) -> Option<u32>
fn public_exponent(&self) -> Option<u32>
Returns the public exponent of the key pair if it exists