Struct der::SecretDocument

source ·
pub struct SecretDocument(_);
Available on crate features alloc and zeroize only.
Expand description

Secret Document type.

Useful for formats which represent potentially secret data, such as cryptographic keys.

This type provides additional hardening such as ensuring that the contents are zeroized-on-drop, and also using more restrictive file permissions when writing files to disk.

Implementations§

Borrow the inner serialized bytes of this document.

Return an allocated ASN.1 DER serialization as a byte vector.

Get the length of the encoded ASN.1 DER in bytes.

Try to decode the inner ASN.1 DER message as the given type.

Encode the provided type as ASN.1 DER.

Available on crate feature pem only.

Decode ASN.1 DER document from PEM.

Available on crate feature pem only.

Encode ASN.1 DER document as a PEM string.

Available on crate feature std only.

Read ASN.1 DER document from a file.

Available on crate feature std only.

Write ASN.1 DER document to a file.

Available on crate features pem and std only.

Read PEM-encoded ASN.1 DER document from a file.

Available on crate features pem and std only.

Write PEM-encoded ASN.1 DER document to a file.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more
Converts to this type from the input type.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.