pub enum Version {
V1,
V2,
}
Expand description
Version identifier for PKCS#8 documents.
(RFC 5958 designates 0
and 1
as the only valid versions for PKCS#8 documents)
Variants
V1
Denotes PKCS#8 v1: no public key field.
V2
Denotes PKCS#8 v2: OneAsymmetricKey
with public key field.
Implementations
sourceimpl Version
impl Version
sourcepub fn has_public_key(self) -> bool
pub fn has_public_key(self) -> bool
Is this version expected to have a public key?
Trait Implementations
sourceimpl Encodable for Version
impl Encodable for Version
sourcefn encoded_len(&self) -> Result<Length>
fn encoded_len(&self) -> Result<Length>
Compute the length of this value in bytes when encoded as ASN.1 DER.
sourcefn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>
Encode this value as ASN.1 DER using the provided Encoder
.
sourcefn encode_to_slice(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice(&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. Read more
impl Copy for Version
impl StructuralPartialEq for Version
Auto Trait Implementations
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
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<'a, T> Choice<'a> for T where
T: Decodable<'a> + Encodable + Tagged,
impl<'a, T> Choice<'a> for T where
T: Decodable<'a> + Encodable + Tagged,
sourcefn can_decode(tag: Tag) -> bool
fn can_decode(tag: Tag) -> bool
Is the provided Tag
decodable as a variant of this CHOICE
?