pub struct RSA4096Keys(/* private fields */);

Implementations§

Trait Implementations§

source§

impl PubKey for RSA4096Keys

source§

fn import_public_key( &self, public_key: &'static [u8], ) -> Result<(), (ErrorCode, &'static [u8])>

Import an existing public key. Read more
source§

fn pub_key(&self) -> Result<&'static [u8], ErrorCode>

Return the public key supplied by import_public_key() or generate(). Read more
source§

fn len(&self) -> usize

Report the length of the public key in bytes, as returned from pub_key(). A value of 0 indicates that the key does not exist.
source§

impl PubPrivKey for RSA4096Keys

source§

fn import_private_key( &self, private_key: &'static [u8], ) -> Result<(), (ErrorCode, &'static [u8])>

Import an existing private key. Read more
source§

fn priv_key(&self) -> Result<&'static [u8], ErrorCode>

Return the private key supplied by import_private_key() or generate(). Read more
source§

fn len(&self) -> usize

Report the length of the private key in bytes, as returned from priv_key(). A value of 0 indicates that the key does not exist.
source§

impl RsaKey for RSA4096Keys

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
source§

impl RsaPrivKey for RSA4096Keys

source§

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

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§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.