[−][src]Struct pkcs8::AlgorithmIdentifier
X.509 AlgorithmIdentifier
Defined in RFC 5280 Section 4.1.1.2: https://tools.ietf.org/html/rfc5280#section-4.1.1.2
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL }
Fields
oid: ObjectIdentifier
Algorithm OID.
This is the algorithm
field in the AlgorithmIdentifier
ASN.1 schema.
parameters: Option<AlgorithmParameters>
Algorithm parameters.
According to RFC 5280, this technically contains algorithm-defined
ANY
data, however as this crate is specialized to RSA and ECC keys,
we only support an OID in this field.
Implementations
impl AlgorithmIdentifier
[src]
pub fn from_der(bytes: &[u8]) -> Result<Self>
[src]
Parse AlgorithmIdentifier
encoded as ASN.1 DER
pub fn write_der<'a>(&self, buffer: &'a mut [u8]) -> Result<&'a [u8]>
[src]
Write ASN.1 DER-encoded AlgorithmIdentifier
to the provided
buffer, returning a slice containing the encoded data.
pub fn to_der(&self) -> Vec<u8>
[src]
This is supported on crate feature
alloc
only.Encode this AlgorithmIdentifier
as ASN.1 DER
Trait Implementations
impl Clone for AlgorithmIdentifier
[src]
pub fn clone(&self) -> AlgorithmIdentifier
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for AlgorithmIdentifier
[src]
impl Debug for AlgorithmIdentifier
[src]
impl Eq for AlgorithmIdentifier
[src]
impl PartialEq<AlgorithmIdentifier> for AlgorithmIdentifier
[src]
pub fn eq(&self, other: &AlgorithmIdentifier) -> bool
[src]
pub fn ne(&self, other: &AlgorithmIdentifier) -> bool
[src]
impl StructuralEq for AlgorithmIdentifier
[src]
impl StructuralPartialEq for AlgorithmIdentifier
[src]
impl<'_> TryFrom<&'_ [u8]> for AlgorithmIdentifier
[src]
Auto Trait Implementations
impl RefUnwindSafe for AlgorithmIdentifier
[src]
impl Send for AlgorithmIdentifier
[src]
impl Sync for AlgorithmIdentifier
[src]
impl Unpin for AlgorithmIdentifier
[src]
impl UnwindSafe for AlgorithmIdentifier
[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<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,