kernel::hil::public_key_crypto::keys

Trait RsaKey

Source
pub trait RsaKey: PubKey {
    // Required methods
    fn map_modulus(&self, closure: &dyn Fn(&[u8])) -> Option<()>;
    fn take_modulus(&self) -> Option<&'static [u8]>;
    fn public_exponent(&self) -> Option<u32>;
}

Required Methods§

Source

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]>

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>

Returns the public exponent of the key pair if it exists

Implementors§