[][src]Struct rpki::crypto::keys::PublicKey

pub struct PublicKey { /* fields omitted */ }

A public key.

Methods

impl PublicKey[src]

pub fn algorithm(&self) -> &PublicKeyFormat[src]

pub fn bits(&self) -> &[u8][src]

pub fn key_identifier(&self) -> KeyIdentifier[src]

pub fn verify(
    &self,
    message: &[u8],
    signature: &Signature
) -> Result<(), VerificationError>
[src]

Verifies a signature using this public key.

impl PublicKey[src]

As SubjectPublicKeyInfo

Public keys are included in X.509 certificates as SubjectPublicKeyInfo structures. As these are contain the same information as PublicKey, it can be decoded from and encoded to such sequences.

pub fn decode<S: Source>(source: S) -> Result<Self, S::Err>[src]

pub fn take_from<S: Source>(cons: &mut Constructed<S>) -> Result<Self, S::Err>[src]

pub fn encode(self) -> impl Values[src]

pub fn encode_ref<'a>(&'a self) -> impl Values + 'a[src]

pub fn encode_subject_name<'a>(&'a self) -> impl Values + 'a[src]

pub fn to_subject_name(&self) -> Name[src]

pub fn to_info_bytes(&self) -> Bytes[src]

Returns a bytes values of the encoded the subjectPublicKeyInfo.

Trait Implementations

impl Clone for PublicKey[src]

impl Eq for PublicKey[src]

impl PartialEq<PublicKey> for PublicKey[src]

impl Debug for PublicKey[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]