Trait kernel::hil::public_key_crypto::keys::RsaPrivKeyMut
source · pub trait RsaPrivKeyMut: PubPrivKeyMut + RsaKeyMut {
// Required methods
fn map_exponent(&self, closure: &dyn Fn(&mut [u8])) -> Option<()>;
fn take_exponent(&self) -> Option<&'static mut [u8]>;
}
Required Methods§
sourcefn map_exponent(&self, closure: &dyn Fn(&mut [u8])) -> Option<()>
fn map_exponent(&self, closure: &dyn Fn(&mut [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
.
sourcefn take_exponent(&self) -> Option<&'static mut [u8]>
fn take_exponent(&self) -> Option<&'static mut [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.