pub struct Document { /* private fields */ }Available on crate feature
pkcs8 only.Expand description
ASN.1 DER-encoded document.
This type wraps an encoded ASN.1 DER message. The document checked to
ensure it contains a valid DER-encoded SEQUENCE.
It implements common functionality related to encoding/decoding such documents, such as PEM encapsulation as well as reading/writing documents from/to the filesystem.
The SecretDocument provides a wrapper for this type with additional
hardening applied.
Implementations§
Source§impl Document
impl Document
Sourcepub fn into_secret(self) -> SecretDocument
Available on crate feature zeroize only.
pub fn into_secret(self) -> SecretDocument
zeroize only.Convert to a SecretDocument.
Trait Implementations§
Source§impl<'a> Decode<'a> for Document
impl<'a> Decode<'a> for Document
Source§impl Encode for Document
impl Encode for Document
Source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this TLV object in bytes when encoded as ASN.1 DER. Read more
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 TLV object to the provided byte slice, returning a sub-slice
containing the encoded message. Read more
Source§impl From<Document> for SecretDocument
Available on crate feature zeroize only.
impl From<Document> for SecretDocument
Available on crate feature
zeroize only.Source§fn from(doc: Document) -> SecretDocument
fn from(doc: Document) -> SecretDocument
Converts to this type from the input type.
Source§impl<'a, 'k, Params, Key> TryFrom<&SubjectPublicKeyInfo<Params, Key>> for Document
Available on crate feature alloc only.
impl<'a, 'k, Params, Key> TryFrom<&SubjectPublicKeyInfo<Params, Key>> for Document
Available on crate feature
alloc only.Source§impl<'a, 'k, Params, Key> TryFrom<SubjectPublicKeyInfo<Params, Key>> for Document
Available on crate feature alloc only.
impl<'a, 'k, Params, Key> TryFrom<SubjectPublicKeyInfo<Params, Key>> for Document
Available on crate feature
alloc only.impl Eq for Document
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin for Document
impl UnwindSafe for Document
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DecodePublicKey for T
impl<T> DecodePublicKey for T
Source§impl<T> IsConstructed for T
impl<T> IsConstructed for T
Source§const CONSTRUCTED: bool
const CONSTRUCTED: bool
ASN.1 constructed bit