[−][src]Struct pkcs8::SubjectPublicKeyInfo
X.509 SubjectPublicKeyInfo
(SPKI)
ASN.1 structure containing an AlgorithmIdentifier
and public key
data in an algorithm specific format.
Described in RFC 5208 Section 4.1: https://tools.ietf.org/html/rfc5280#section-4.1
SubjectPublicKeyInfo ::= SEQUENCE {
algorithm AlgorithmIdentifier,
subjectPublicKey BIT STRING }
Fields
algorithm: AlgorithmIdentifier
X.509 AlgorithmIdentifier
subject_public_key: &'a [u8]
Public key data
Implementations
impl<'a> SubjectPublicKeyInfo<'a>
[src]
pub fn from_der(bytes: &'a [u8]) -> Result<Self>
[src]
Parse SubjectPublicKeyInfo
encoded as ASN.1 DER.
pub fn write_der<'b>(&self, buffer: &'b mut [u8]) -> Result<&'b [u8]>
[src]
Write ASN.1 DER-encoded SubjectPublicKeyInfo
to the provided
buffer, returning a slice containing the encoded data.
pub fn to_der(&self) -> PublicKeyDocument
[src]
This is supported on crate feature
alloc
only.Encode this `SubjectPublicKeyInfo as ASN.1 DER.
pub fn to_pem(&self) -> String
[src]
This is supported on crate feature
pem
only.Encode this SubjectPublicKeyInfo
as PEM-encoded ASN.1 DER.
Trait Implementations
impl<'a> Clone for SubjectPublicKeyInfo<'a>
[src]
pub fn clone(&self) -> SubjectPublicKeyInfo<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Copy for SubjectPublicKeyInfo<'a>
[src]
impl<'a> Debug for SubjectPublicKeyInfo<'a>
[src]
impl<'a> Eq for SubjectPublicKeyInfo<'a>
[src]
impl<'a> Message<'a> for SubjectPublicKeyInfo<'a>
[src]
pub fn fields<F, T>(&self, f: F) -> Result<T> where
F: FnOnce(&[&dyn Encodable]) -> Result<T>,
[src]
F: FnOnce(&[&dyn Encodable]) -> Result<T>,
impl<'a> PartialEq<SubjectPublicKeyInfo<'a>> for SubjectPublicKeyInfo<'a>
[src]
pub fn eq(&self, other: &SubjectPublicKeyInfo<'a>) -> bool
[src]
pub fn ne(&self, other: &SubjectPublicKeyInfo<'a>) -> bool
[src]
impl<'a> StructuralEq for SubjectPublicKeyInfo<'a>
[src]
impl<'a> StructuralPartialEq for SubjectPublicKeyInfo<'a>
[src]
impl<'a> TryFrom<&'a [u8]> for SubjectPublicKeyInfo<'a>
[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(bytes: &'a [u8]) -> Result<Self>
[src]
impl<'a> TryFrom<Any<'a>> for SubjectPublicKeyInfo<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for SubjectPublicKeyInfo<'a>
[src]
impl<'a> Send for SubjectPublicKeyInfo<'a>
[src]
impl<'a> Sync for SubjectPublicKeyInfo<'a>
[src]
impl<'a> Unpin for SubjectPublicKeyInfo<'a>
[src]
impl<'a> UnwindSafe for SubjectPublicKeyInfo<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> Decodable<'a> for T where
T: TryFrom<Any<'a>, Error = Error>,
[src]
T: TryFrom<Any<'a>, Error = Error>,
pub fn decode(decoder: &mut Decoder<'a>) -> Result<T, Error>
[src]
pub fn from_bytes(bytes: &'a [u8]) -> Result<Self, Error>
[src]
impl<'a, M> Encodable for M where
M: Message<'a>,
[src]
M: Message<'a>,
pub fn encoded_len(&self) -> Result<Length, Error>
[src]
pub fn encode(&self, encoder: &mut Encoder<'_>) -> Result<(), Error>
[src]
pub fn encode_to_slice(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
[src]
pub fn encode_to_vec(&self, buf: &mut Vec<u8, Global>) -> Result<Length, Error>
[src]
pub fn to_vec(&self) -> Result<Vec<u8, Global>, Error>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<'a, M> Tagged for M where
M: Message<'a>,
[src]
M: Message<'a>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,