Struct x509_signature::SubjectPublicKeyInfo
source · [−]pub struct SubjectPublicKeyInfo<'a> { /* private fields */ }
Expand description
A PKIX SubjectPublicKeyInfo struct
Implementations
sourceimpl<'a> SubjectPublicKeyInfo<'a>
impl<'a> SubjectPublicKeyInfo<'a>
sourcepub fn spki(&self) -> &'a [u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn spki(&self) -> &'a [u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
The data over which the signature is computed. An X.509 SEQUENCE.
sourcepub fn algorithm(&self) -> &'a [u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn algorithm(&self) -> &'a [u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
The algorithm identifier, with the outer SEQUENCE stripped.
sourcepub fn key(&self) -> &'a [u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn key(&self) -> &'a [u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
The raw bytes of the signature.
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
sourceimpl<'a> Clone for SubjectPublicKeyInfo<'a>
impl<'a> Clone for SubjectPublicKeyInfo<'a>
sourcefn clone(&self) -> SubjectPublicKeyInfo<'a>
fn clone(&self) -> SubjectPublicKeyInfo<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for SubjectPublicKeyInfo<'a>
impl<'a> Debug for SubjectPublicKeyInfo<'a>
impl<'a> Copy for SubjectPublicKeyInfo<'a>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more