[][src]Struct x509_signature::SubjectPublicKeyInfo

pub struct SubjectPublicKeyInfo<'a> { /* fields omitted */ }

A PKIX SubjectPublicKeyInfo struct

Implementations

impl<'a> SubjectPublicKeyInfo<'a>[src]

pub fn spki(&self) -> &'a [u8][src]

The data over which the signature is computed. An X.509 SEQUENCE.

pub fn algorithm(&self) -> &'a [u8][src]

The algorithm identifier, with the outer SEQUENCE stripped.

pub fn key(&self) -> &'a [u8][src]

The raw bytes of the signature.

pub fn read(input: &mut Reader<'a>) -> Result<Self, Error>[src]

Read a SubjectPublicKeyInfo from an untrusted::Reader

pub fn check_signature(
    &self,
    algorithm: SignatureScheme,
    message: &[u8],
    signature: &[u8],
    restrictions: Restrictions
) -> Result<(), Error>
[src]

Verify a signature by the private key corresponding to this SubjectPublicKeyInfo. restrictions indicates the restrictions on allowed algorithms.

pub fn public_key(
    &self,
    algorithm: SignatureScheme,
    restrictions: Restrictions
) -> Result<UnparsedPublicKey<&'a [u8]>, Error>
[src]

Get a signature::UnparsedPublicKey for this SubjectPublicKeyInfo.

restrictions indicates the restrictions on allowed algorithms.

pub fn get_public_key_x509(
    &self,
    algorithm_id: &[u8]
) -> Result<UnparsedPublicKey<&'a [u8]>, Error>
[src]

Get a signature::UnparsedPublicKey for this SubjectPublicKeyInfo

Trait Implementations

impl<'a> Clone for SubjectPublicKeyInfo<'a>[src]

impl<'a> Copy for SubjectPublicKeyInfo<'a>[src]

impl<'a> Debug for SubjectPublicKeyInfo<'a>[src]

Auto Trait Implementations

impl<'a> Send for SubjectPublicKeyInfo<'a>

impl<'a> Sync for SubjectPublicKeyInfo<'a>

impl<'a> Unpin for SubjectPublicKeyInfo<'a>

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.