Struct pkcs8::SubjectPublicKeyInfo
source · pub struct SubjectPublicKeyInfo<Params, Key> {
pub algorithm: AlgorithmIdentifier<Params>,
pub subject_public_key: Key,
}
Expand description
X.509 SubjectPublicKeyInfo
(SPKI) as defined in RFC 5280 § 4.1.2.7.
ASN.1 structure containing an AlgorithmIdentifier
and public key
data in an algorithm specific format.
SubjectPublicKeyInfo ::= SEQUENCE {
algorithm AlgorithmIdentifier,
subjectPublicKey BIT STRING }
Fields§
§algorithm: AlgorithmIdentifier<Params>
X.509 AlgorithmIdentifier
for the public key type
subject_public_key: Key
Public key data
Trait Implementations§
source§impl<Params, Key> Clone for SubjectPublicKeyInfo<Params, Key>where
Params: Clone,
Key: Clone,
impl<Params, Key> Clone for SubjectPublicKeyInfo<Params, Key>where Params: Clone, Key: Clone,
source§fn clone(&self) -> SubjectPublicKeyInfo<Params, Key>
fn clone(&self) -> SubjectPublicKeyInfo<Params, Key>
Returns a copy 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<Params, Key> Debug for SubjectPublicKeyInfo<Params, Key>where
Params: Debug,
Key: Debug,
impl<Params, Key> Debug for SubjectPublicKeyInfo<Params, Key>where Params: Debug, Key: Debug,
source§impl<'a, 'k, Params, Key> DecodeValue<'a> for SubjectPublicKeyInfo<Params, Key>where
'a: 'k,
Key: 'k + Decode<'a>,
Params: Choice<'a> + Encode,
impl<'a, 'k, Params, Key> DecodeValue<'a> for SubjectPublicKeyInfo<Params, Key>where 'a: 'k, Key: 'k + Decode<'a>, Params: Choice<'a> + Encode,
source§fn decode_value<R>(
reader: &mut R,
header: Header
) -> Result<SubjectPublicKeyInfo<Params, Key>, Error>where
R: Reader<'a>,
fn decode_value<R>( reader: &mut R, header: Header ) -> Result<SubjectPublicKeyInfo<Params, Key>, Error>where R: Reader<'a>,
Attempt to decode this message using the provided
Reader
.source§impl<'a, Params, Key> EncodeValue for SubjectPublicKeyInfo<Params, Key>where
Params: Choice<'a> + Encode,
Key: Encode,
impl<'a, Params, Key> EncodeValue for SubjectPublicKeyInfo<Params, Key>where Params: Choice<'a> + Encode, Key: Encode,
source§impl OwnedToRef for SubjectPublicKeyInfo<Any, BitString>
impl OwnedToRef for SubjectPublicKeyInfo<Any, BitString>
§type Borrowed = SubjectPublicKeyInfo<AnyRef<'a>, BitStringRef<'a>>
type Borrowed = SubjectPublicKeyInfo<AnyRef<'a>, BitStringRef<'a>>
The resulting type referencing back to Self
source§fn owned_to_ref(
&self
) -> <SubjectPublicKeyInfo<Any, BitString> as OwnedToRef>::Borrowed<'_>
fn owned_to_ref( &self ) -> <SubjectPublicKeyInfo<Any, BitString> as OwnedToRef>::Borrowed<'_>
Creates a new object referencing back to the self for storage
source§impl<Params, Key> PartialEq<SubjectPublicKeyInfo<Params, Key>> for SubjectPublicKeyInfo<Params, Key>where
Params: PartialEq<Params>,
Key: PartialEq<Key>,
impl<Params, Key> PartialEq<SubjectPublicKeyInfo<Params, Key>> for SubjectPublicKeyInfo<Params, Key>where Params: PartialEq<Params>, Key: PartialEq<Key>,
source§fn eq(&self, other: &SubjectPublicKeyInfo<Params, Key>) -> bool
fn eq(&self, other: &SubjectPublicKeyInfo<Params, Key>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<Params, Key> PemLabel for SubjectPublicKeyInfo<Params, Key>
Available on crate feature pem
only.
impl<Params, Key> PemLabel for SubjectPublicKeyInfo<Params, Key>
Available on crate feature
pem
only.source§impl<'a> RefToOwned<'a> for SubjectPublicKeyInfo<AnyRef<'a>, BitStringRef<'a>>
impl<'a> RefToOwned<'a> for SubjectPublicKeyInfo<AnyRef<'a>, BitStringRef<'a>>
§type Owned = SubjectPublicKeyInfo<Any, BitString>
type Owned = SubjectPublicKeyInfo<Any, BitString>
The resulting type after obtaining ownership.
source§fn ref_to_owned(
&self
) -> <SubjectPublicKeyInfo<AnyRef<'a>, BitStringRef<'a>> as RefToOwned<'a>>::Owned
fn ref_to_owned( &self ) -> <SubjectPublicKeyInfo<AnyRef<'a>, BitStringRef<'a>> as RefToOwned<'a>>::Owned
Creates a new object taking ownership of the data
source§impl<'a, Params, Key> TryFrom<&'a [u8]> for SubjectPublicKeyInfo<Params, Key>where
Params: Choice<'a> + Encode,
Key: Decode<'a> + Encode + FixedTag,
impl<'a, Params, Key> TryFrom<&'a [u8]> for SubjectPublicKeyInfo<Params, Key>where Params: Choice<'a> + Encode, Key: Decode<'a> + Encode + FixedTag,
source§impl<'a, 'k, Params, Key> TryFrom<&SubjectPublicKeyInfo<Params, Key>> for Documentwhere
'a: 'k,
Key: 'k + Decode<'a> + Encode + FixedTag,
Params: Choice<'a> + Encode,
BitStringRef<'a>: From<&'k Key>,
Available on crate feature alloc
only.
impl<'a, 'k, Params, Key> TryFrom<&SubjectPublicKeyInfo<Params, Key>> for Documentwhere 'a: 'k, Key: 'k + Decode<'a> + Encode + FixedTag, Params: Choice<'a> + Encode, BitStringRef<'a>: From<&'k Key>,
Available on crate feature
alloc
only.source§impl<'a, 'k, Params, Key> TryFrom<SubjectPublicKeyInfo<Params, Key>> for Documentwhere
'a: 'k,
Key: 'k + Decode<'a> + Encode + FixedTag,
Params: Choice<'a> + Encode,
BitStringRef<'a>: From<&'k Key>,
Available on crate feature alloc
only.
impl<'a, 'k, Params, Key> TryFrom<SubjectPublicKeyInfo<Params, Key>> for Documentwhere 'a: 'k, Key: 'k + Decode<'a> + Encode + FixedTag, Params: Choice<'a> + Encode, BitStringRef<'a>: From<&'k Key>,
Available on crate feature
alloc
only.source§impl<'a, Params, Key> ValueOrd for SubjectPublicKeyInfo<Params, Key>where
Params: Choice<'a> + DerOrd + Encode,
Key: ValueOrd,
impl<'a, Params, Key> ValueOrd for SubjectPublicKeyInfo<Params, Key>where Params: Choice<'a> + DerOrd + Encode, Key: ValueOrd,
impl<Params, Key> Eq for SubjectPublicKeyInfo<Params, Key>where Params: Eq, Key: Eq,
impl<'a, Params, Key> Sequence<'a> for SubjectPublicKeyInfo<Params, Key>where Params: Choice<'a> + Encode, Key: Decode<'a> + Encode + FixedTag,
impl<Params, Key> StructuralEq for SubjectPublicKeyInfo<Params, Key>
impl<Params, Key> StructuralPartialEq for SubjectPublicKeyInfo<Params, Key>
Auto Trait Implementations§
impl<Params, Key> RefUnwindSafe for SubjectPublicKeyInfo<Params, Key>where Key: RefUnwindSafe, Params: RefUnwindSafe,
impl<Params, Key> Send for SubjectPublicKeyInfo<Params, Key>where Key: Send, Params: Send,
impl<Params, Key> Sync for SubjectPublicKeyInfo<Params, Key>where Key: Sync, Params: Sync,
impl<Params, Key> Unpin for SubjectPublicKeyInfo<Params, Key>where Key: Unpin, Params: Unpin,
impl<Params, Key> UnwindSafe for SubjectPublicKeyInfo<Params, Key>where Key: UnwindSafe, Params: UnwindSafe,
Blanket Implementations§
source§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere T: DecodeValue<'a> + FixedTag,
source§impl<T> DecodePem for Twhere
T: DecodeOwned + PemLabel,
impl<T> DecodePem for Twhere T: DecodeOwned + PemLabel,
source§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere T: EncodeValue + Tagged,
source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
source§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided Writer
.
source§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.