Struct pkcs1::RsaPublicKeyDocument
source · [−]pub struct RsaPublicKeyDocument(_);
Expand description
PKCS#1 RSA PUBLIC KEY
document.
This type provides storage for RsaPublicKey
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 RsaPublicKeyDocument
impl Clone for RsaPublicKeyDocument
sourcefn clone(&self) -> RsaPublicKeyDocument
fn clone(&self) -> RsaPublicKeyDocument
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 RsaPublicKeyDocument
impl Debug for RsaPublicKeyDocument
sourceimpl From<&'_ RsaPublicKey<'_>> for RsaPublicKeyDocument
impl From<&'_ RsaPublicKey<'_>> for RsaPublicKeyDocument
sourcefn from(public_key: &RsaPublicKey<'_>) -> RsaPublicKeyDocument
fn from(public_key: &RsaPublicKey<'_>) -> RsaPublicKeyDocument
Converts to this type from the input type.
sourceimpl From<RsaPublicKey<'_>> for RsaPublicKeyDocument
impl From<RsaPublicKey<'_>> for RsaPublicKeyDocument
sourcefn from(public_key: RsaPublicKey<'_>) -> RsaPublicKeyDocument
fn from(public_key: RsaPublicKey<'_>) -> RsaPublicKeyDocument
Converts to this type from the input type.
sourceimpl FromRsaPublicKey for RsaPublicKeyDocument
impl FromRsaPublicKey for RsaPublicKeyDocument
sourcefn from_pkcs1_public_key(public_key: RsaPublicKey<'_>) -> Result<Self>
fn from_pkcs1_public_key(public_key: RsaPublicKey<'_>) -> Result<Self>
Parse RsaPublicKey
into a RsaPublicKey
.
sourcefn from_pkcs1_der(bytes: &[u8]) -> Result<Self>
fn from_pkcs1_der(bytes: &[u8]) -> Result<Self>
Deserialize object from ASN.1 DER-encoded RsaPublicKey
(binary format). Read more
sourcefn from_pkcs1_pem(s: &str) -> Result<Self>
fn from_pkcs1_pem(s: &str) -> Result<Self>
Deserialize PEM-encoded RsaPublicKey
. Read more
sourcefn read_pkcs1_der_file(path: &Path) -> Result<Self>
fn read_pkcs1_der_file(path: &Path) -> Result<Self>
Load RsaPublicKey
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 RsaPublicKey
from a PEM-encoded file on the local filesystem.
sourceimpl FromStr for RsaPublicKeyDocument
impl FromStr for RsaPublicKeyDocument
sourceimpl ToRsaPublicKey for RsaPublicKeyDocument
impl ToRsaPublicKey for RsaPublicKeyDocument
sourcefn to_pkcs1_der(&self) -> Result<RsaPublicKeyDocument>
fn to_pkcs1_der(&self) -> Result<RsaPublicKeyDocument>
Serialize a RsaPublicKeyDocument
containing a PKCS#1-encoded public key.
sourcefn to_pkcs1_pem_with_le(&self, line_ending: LineEnding) -> Result<String>
fn to_pkcs1_pem_with_le(&self, line_ending: LineEnding) -> Result<String>
Serialize this public key as PEM-encoded PKCS#1 with the given line ending.
sourcefn write_pkcs1_der_file(&self, path: &Path) -> Result<()>
fn write_pkcs1_der_file(&self, path: &Path) -> Result<()>
Write ASN.1 DER-encoded public 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 public key to the given path.
sourcefn to_pkcs1_pem(&self) -> Result<String>
fn to_pkcs1_pem(&self) -> Result<String>
Serialize this public key as PEM-encoded PKCS#1.
Auto Trait Implementations
impl RefUnwindSafe for RsaPublicKeyDocument
impl Send for RsaPublicKeyDocument
impl Sync for RsaPublicKeyDocument
impl Unpin for RsaPublicKeyDocument
impl UnwindSafe for RsaPublicKeyDocument
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