Struct pkcs1::RsaPrivateKeyDocument
source · [−]pub struct RsaPrivateKeyDocument(_);
Expand description
PKCS#1 RSA PRIVATE KEY
document.
This type provides storage for RsaPrivateKey
encoded as ASN.1 DER
with the invariant that the contained-document is “well-formed”, i.e. it
will parse successfully according to this crate’s parsing rules.
Implementations
Trait Implementations
sourceimpl Clone for RsaPrivateKeyDocument
impl Clone for RsaPrivateKeyDocument
sourcefn clone(&self) -> RsaPrivateKeyDocument
fn clone(&self) -> RsaPrivateKeyDocument
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RsaPrivateKeyDocument
impl Debug for RsaPrivateKeyDocument
sourceimpl From<&'_ RsaPrivateKey<'_>> for RsaPrivateKeyDocument
impl From<&'_ RsaPrivateKey<'_>> for RsaPrivateKeyDocument
sourcefn from(private_key: &RsaPrivateKey<'_>) -> RsaPrivateKeyDocument
fn from(private_key: &RsaPrivateKey<'_>) -> RsaPrivateKeyDocument
Converts to this type from the input type.
sourceimpl From<RsaPrivateKey<'_>> for RsaPrivateKeyDocument
impl From<RsaPrivateKey<'_>> for RsaPrivateKeyDocument
sourcefn from(private_key: RsaPrivateKey<'_>) -> RsaPrivateKeyDocument
fn from(private_key: RsaPrivateKey<'_>) -> RsaPrivateKeyDocument
Converts to this type from the input type.
sourceimpl FromRsaPrivateKey for RsaPrivateKeyDocument
impl FromRsaPrivateKey for RsaPrivateKeyDocument
sourcefn from_pkcs1_private_key(private_key: RsaPrivateKey<'_>) -> Result<Self>
fn from_pkcs1_private_key(private_key: RsaPrivateKey<'_>) -> Result<Self>
Parse the RsaPrivateKey
from a PKCS#1-encoded document.
sourcefn from_pkcs1_der(bytes: &[u8]) -> Result<Self>
fn from_pkcs1_der(bytes: &[u8]) -> Result<Self>
Deserialize PKCS#1 private key from ASN.1 DER-encoded data (binary format). Read more
sourcefn from_pkcs1_pem(s: &str) -> Result<Self>
fn from_pkcs1_pem(s: &str) -> Result<Self>
Deserialize PKCS#1-encoded private key from PEM. Read more
sourcefn read_pkcs1_der_file(path: &Path) -> Result<Self>
fn read_pkcs1_der_file(path: &Path) -> Result<Self>
Load PKCS#1 private key from an ASN.1 DER-encoded file on the local filesystem (binary format). Read more
sourcefn read_pkcs1_pem_file(path: &Path) -> Result<Self>
fn read_pkcs1_pem_file(path: &Path) -> Result<Self>
Load PKCS#1 private key from a PEM-encoded file on the local filesystem.
sourceimpl FromStr for RsaPrivateKeyDocument
impl FromStr for RsaPrivateKeyDocument
sourceimpl ToRsaPrivateKey for RsaPrivateKeyDocument
impl ToRsaPrivateKey for RsaPrivateKeyDocument
sourcefn to_pkcs1_der(&self) -> Result<RsaPrivateKeyDocument>
fn to_pkcs1_der(&self) -> Result<RsaPrivateKeyDocument>
Serialize a RsaPrivateKeyDocument
containing a PKCS#1-encoded private key.
sourcefn to_pkcs1_pem_with_le(
&self,
line_ending: LineEnding
) -> Result<Zeroizing<String>>
fn to_pkcs1_pem_with_le(
&self,
line_ending: LineEnding
) -> Result<Zeroizing<String>>
Serialize this private key as PEM-encoded PKCS#1 with the given LineEnding
.
sourcefn write_pkcs1_der_file(&self, path: &Path) -> Result<()>
fn write_pkcs1_der_file(&self, path: &Path) -> Result<()>
Write ASN.1 DER-encoded PKCS#1 private key to the given path.
sourcefn write_pkcs1_pem_file(&self, path: &Path) -> Result<()>
fn write_pkcs1_pem_file(&self, path: &Path) -> Result<()>
Write ASN.1 DER-encoded PKCS#1 private key to the given path.
sourcefn to_pkcs1_pem(&self) -> Result<Zeroizing<String>>
fn to_pkcs1_pem(&self) -> Result<Zeroizing<String>>
Serialize this private key as PEM-encoded PKCS#1.
Auto Trait Implementations
impl RefUnwindSafe for RsaPrivateKeyDocument
impl Send for RsaPrivateKeyDocument
impl Sync for RsaPrivateKeyDocument
impl Unpin for RsaPrivateKeyDocument
impl UnwindSafe for RsaPrivateKeyDocument
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<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more