Struct rsa::RsaPublicKey
source · pub struct RsaPublicKey { /* private fields */ }
Expand description
Represents the public part of an RSA key.
Implementations§
Trait Implementations§
source§impl Clone for RsaPublicKey
impl Clone for RsaPublicKey
source§fn clone(&self) -> RsaPublicKey
fn clone(&self) -> RsaPublicKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RsaPublicKey
impl Debug for RsaPublicKey
source§impl DecodePublicKey for RsaPublicKey
impl DecodePublicKey for RsaPublicKey
source§fn from_public_key_der(bytes: &[u8]) -> Result<Self, Error>
fn from_public_key_der(bytes: &[u8]) -> Result<Self, Error>
Deserialize object from ASN.1 DER-encoded
SubjectPublicKeyInfo
(binary format).source§fn from_public_key_doc(doc: &PublicKeyDocument) -> Result<Self, Error>
fn from_public_key_doc(doc: &PublicKeyDocument) -> Result<Self, Error>
Deserialize SPKI public key from a
PublicKeyDocument
.source§fn from_public_key_pem(s: &str) -> Result<Self, Error>
fn from_public_key_pem(s: &str) -> Result<Self, Error>
Deserialize PEM-encoded
SubjectPublicKeyInfo
. Read moresource§impl EncodePublicKey for RsaPublicKey
impl EncodePublicKey for RsaPublicKey
source§fn to_public_key_der(&self) -> Result<PublicKeyDocument>
fn to_public_key_der(&self) -> Result<PublicKeyDocument>
Serialize a
PublicKeyDocument
containing a SPKI-encoded public key.source§fn to_public_key_pem(&self, line_ending: LineEnding) -> Result<String, Error>
fn to_public_key_pem(&self, line_ending: LineEnding) -> Result<String, Error>
Serialize this public key as PEM-encoded SPKI with the given
LineEnding
.source§fn write_public_key_der_file(&self, path: impl AsRef<Path>) -> Result<(), Error>
fn write_public_key_der_file(&self, path: impl AsRef<Path>) -> Result<(), Error>
Write ASN.1 DER-encoded public key to the given path
source§fn write_public_key_pem_file(
&self,
path: impl AsRef<Path>,
line_ending: LineEnding
) -> Result<(), Error>
fn write_public_key_pem_file( &self, path: impl AsRef<Path>, line_ending: LineEnding ) -> Result<(), Error>
Write ASN.1 DER-encoded public key to the given path
source§impl From<&RsaPrivateKey> for RsaPublicKey
impl From<&RsaPrivateKey> for RsaPublicKey
source§fn from(private_key: &RsaPrivateKey) -> Self
fn from(private_key: &RsaPrivateKey) -> Self
Converts to this type from the input type.
source§impl From<RsaPrivateKey> for RsaPublicKey
impl From<RsaPrivateKey> for RsaPublicKey
source§fn from(private_key: RsaPrivateKey) -> Self
fn from(private_key: RsaPrivateKey) -> Self
Converts to this type from the input type.
source§impl Hash for RsaPublicKey
impl Hash for RsaPublicKey
source§impl PartialEq for RsaPublicKey
impl PartialEq for RsaPublicKey
source§fn eq(&self, other: &RsaPublicKey) -> bool
fn eq(&self, other: &RsaPublicKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PublicKey for &'a RsaPublicKey
impl<'a> PublicKey for &'a RsaPublicKey
source§impl PublicKey for RsaPublicKey
impl PublicKey for RsaPublicKey
source§impl<'a> PublicKeyParts for &'a RsaPublicKey
impl<'a> PublicKeyParts for &'a RsaPublicKey
source§impl PublicKeyParts for RsaPublicKey
impl PublicKeyParts for RsaPublicKey
source§impl TryFrom<SubjectPublicKeyInfo<'_>> for RsaPublicKey
impl TryFrom<SubjectPublicKeyInfo<'_>> for RsaPublicKey
impl Eq for RsaPublicKey
impl StructuralEq for RsaPublicKey
impl StructuralPartialEq for RsaPublicKey
Auto Trait Implementations§
impl RefUnwindSafe for RsaPublicKey
impl Send for RsaPublicKey
impl Sync for RsaPublicKey
impl Unpin for RsaPublicKey
impl UnwindSafe for RsaPublicKey
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> DecodeRsaPublicKey for Twhere
T: DecodePublicKey,
impl<T> DecodeRsaPublicKey for Twhere
T: DecodePublicKey,
source§fn from_pkcs1_der(public_key: &[u8]) -> Result<T, Error>
fn from_pkcs1_der(public_key: &[u8]) -> Result<T, Error>
Deserialize object from ASN.1 DER-encoded [
RsaPublicKey
]
(binary format).source§fn from_pkcs1_pem(s: &str) -> Result<Self, Error>
fn from_pkcs1_pem(s: &str) -> Result<Self, Error>
Deserialize PEM-encoded [
RsaPublicKey
]. Read moresource§impl<T> EncodeRsaPublicKey for Twhere
T: EncodePublicKey,
impl<T> EncodeRsaPublicKey for Twhere
T: EncodePublicKey,
source§fn to_pkcs1_der(&self) -> Result<RsaPublicKeyDocument, Error>
fn to_pkcs1_der(&self) -> Result<RsaPublicKeyDocument, Error>
Serialize a
RsaPublicKeyDocument
containing a PKCS#1-encoded public key.source§fn to_pkcs1_pem(&self, line_ending: LineEnding) -> Result<String, Error>
fn to_pkcs1_pem(&self, line_ending: LineEnding) -> Result<String, Error>
Serialize this public key as PEM-encoded PKCS#1 with the given line ending.
source§fn write_pkcs1_der_file(&self, path: impl AsRef<Path>) -> Result<(), Error>
fn write_pkcs1_der_file(&self, path: impl AsRef<Path>) -> Result<(), Error>
Write ASN.1 DER-encoded public key to the given path.
source§fn write_pkcs1_pem_file(
&self,
path: impl AsRef<Path>,
line_ending: LineEnding
) -> Result<(), Error>
fn write_pkcs1_pem_file( &self, path: impl AsRef<Path>, line_ending: LineEnding ) -> Result<(), Error>
Write ASN.1 DER-encoded public key to the given path.