pub struct RSAPublicKey<'a> {
    pub modulus: &'a [u8],
    pub exponent: &'a [u8],
}
Expand description

RSA public Key, defined in rfc3279

Fields

modulus: &'a [u8]

Raw bytes of the modulus

This possibly includes a leading 0 if the MSB is 1

exponent: &'a [u8]

Raw bytes of the exponent

This possibly includes a leading 0 if the MSB is 1

Implementations

Attempt to convert exponent to u64

Returns an error if integer is too large, empty, or negative

Return the key size (in bits) or 0

Trait Implementations

Formats the value using the given formatter. Read more

Attempt to parse input bytes into a DER object (enforcing constraints)

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.