Trait kernel::hil::public_key_crypto::keys::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§