pub struct SubjectPublicKeyInfo<'a> { /* private fields */ }
Expand description
A PKIX SubjectPublicKeyInfo struct
Implementations§
Source§impl<'a> SubjectPublicKeyInfo<'a>
impl<'a> SubjectPublicKeyInfo<'a>
Sourcepub fn spki(&self) -> &'a [u8]
pub fn spki(&self) -> &'a [u8]
The data over which the signature is computed. An X.509 SEQUENCE.
Sourcepub fn algorithm(&self) -> &'a [u8]
pub fn algorithm(&self) -> &'a [u8]
The algorithm identifier, with the outer SEQUENCE stripped.
Sourcepub fn read(input: &mut Reader<'a>) -> Result<Self, Error>
pub fn read(input: &mut Reader<'a>) -> Result<Self, Error>
Read a SubjectPublicKeyInfo from an untrusted::Reader
Sourcepub fn check_signature(
&self,
algorithm: SignatureScheme,
message: &[u8],
signature: &[u8],
restrictions: Restrictions,
) -> Result<(), Error>
pub fn check_signature( &self, algorithm: SignatureScheme, message: &[u8], signature: &[u8], restrictions: Restrictions, ) -> Result<(), Error>
Verify a signature by the private key corresponding to this
SubjectPublicKeyInfo. restrictions
indicates the restrictions on
allowed algorithms.
Sourcepub fn public_key(
&self,
algorithm: SignatureScheme,
restrictions: Restrictions,
) -> Result<UnparsedPublicKey<&'a [u8]>, Error>
pub fn public_key( &self, algorithm: SignatureScheme, restrictions: Restrictions, ) -> Result<UnparsedPublicKey<&'a [u8]>, Error>
Get a signature::UnparsedPublicKey
for this SubjectPublicKeyInfo.
restrictions
indicates the restrictions on allowed algorithms.
Sourcepub fn get_public_key_x509(
&self,
algorithm_id: &[u8],
) -> Result<UnparsedPublicKey<&'a [u8]>, Error>
pub fn get_public_key_x509( &self, algorithm_id: &[u8], ) -> Result<UnparsedPublicKey<&'a [u8]>, Error>
Get a signature::UnparsedPublicKey
for this SubjectPublicKeyInfo
Trait Implementations§
Source§impl<'a> Clone for SubjectPublicKeyInfo<'a>
impl<'a> Clone for SubjectPublicKeyInfo<'a>
Source§fn clone(&self) -> SubjectPublicKeyInfo<'a>
fn clone(&self) -> SubjectPublicKeyInfo<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for SubjectPublicKeyInfo<'a>
impl<'a> Debug for SubjectPublicKeyInfo<'a>
impl<'a> Copy for SubjectPublicKeyInfo<'a>
Auto Trait Implementations§
impl<'a> Freeze for SubjectPublicKeyInfo<'a>
impl<'a> RefUnwindSafe for SubjectPublicKeyInfo<'a>
impl<'a> Send for SubjectPublicKeyInfo<'a>
impl<'a> Sync for SubjectPublicKeyInfo<'a>
impl<'a> Unpin for SubjectPublicKeyInfo<'a>
impl<'a> UnwindSafe for SubjectPublicKeyInfo<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more