[−][src]Struct rpki::crypto::keys::PublicKeyFormat
The formats of public keys used by RPKI.
Currently, RPKI uses exactly one type of public keys, RSA keys with a size of 2048 bits. However, as that might change in the future, we are not hard-coding that format but rather use this type – which for the time being is zero-sized.
Methods
impl PublicKeyFormat
[src]
ASN.1 Algorithm Identifiers
The format of the public key is identified in certificates through a algorithm identifier defined with this ASN.1:
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL }
Right now, the object identifier needs to be that of rsaEncryption
defined by RFC 4055 and the parameters must be present and NULL.
Then parsing, we generously also allow it to be absent altogether.
The functions and methods in this section allow decoding and encoding of these identifiers.
pub fn take_from<S: Source>(cons: &mut Constructed<S>) -> Result<Self, S::Err>
[src]
Takes and returns a algorithm identifier.
Returns a malformed error if the algorithm isn’t one of the allowed algorithms or if the value isn’t correctly encoded.
pub fn encode(self) -> impl Values
[src]
Provides an encoder for the algorihm identifier.
Trait Implementations
impl Clone for PublicKeyFormat
[src]
fn clone(&self) -> PublicKeyFormat
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for PublicKeyFormat
[src]
impl Default for PublicKeyFormat
[src]
fn default() -> PublicKeyFormat
[src]
impl Eq for PublicKeyFormat
[src]
impl PartialEq<PublicKeyFormat> for PublicKeyFormat
[src]
fn eq(&self, other: &PublicKeyFormat) -> bool
[src]
fn ne(&self, other: &PublicKeyFormat) -> bool
[src]
impl Debug for PublicKeyFormat
[src]
impl StructuralPartialEq for PublicKeyFormat
[src]
impl StructuralEq for PublicKeyFormat
[src]
Auto Trait Implementations
impl Send for PublicKeyFormat
impl Sync for PublicKeyFormat
impl Unpin for PublicKeyFormat
impl UnwindSafe for PublicKeyFormat
impl RefUnwindSafe for PublicKeyFormat
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,