Skip to main content

RsaPublicKey

Type Alias RsaPublicKey 

Source
pub type RsaPublicKey = GenericRsaPublicKey<BoxedUint, BoxedMontyParams>;
Available on crate feature alloc only.
Expand description

Boxed RSA public key alias used by the alloc code path. Equivalent to GenericRsaPublicKey<BoxedUint, BoxedMontyParams>.

Aliased Type§

pub struct RsaPublicKey { /* private fields */ }

Trait Implementations§

Source§

impl DecodeRsaPublicKey for RsaPublicKey

Available on crate feature encoding only.
Source§

fn from_pkcs1_der(bytes: &[u8]) -> Result<Self>

Deserialize object from ASN.1 DER-encoded RsaPublicKey (binary format).
Source§

fn from_pkcs1_pem(s: &str) -> Result<Self, Error>

Available on crate feature pem only.
Deserialize PEM-encoded RsaPublicKey. Read more
Source§

fn read_pkcs1_der_file(path: impl AsRef<Path>) -> Result<Self, Error>

Available on crate feature std only.
Load RsaPublicKey from an ASN.1 DER-encoded file on the local filesystem (binary format).
Source§

fn read_pkcs1_pem_file(path: impl AsRef<Path>) -> Result<Self, Error>

Available on crate features pem and std only.
Load RsaPublicKey from a PEM-encoded file on the local filesystem.
Source§

impl<'de> Deserialize<'de> for RsaPublicKey

Available on crate feature serde only.
Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl EncodePublicKey for RsaPublicKey

Available on crate feature encoding only.
Source§

fn to_public_key_der(&self) -> Result<Document>

Serialize a Document containing a SPKI-encoded public key. Read more
Source§

fn to_public_key_pem(&self, line_ending: LineEnding) -> Result<String, Error>

Available on crate feature pem only.
Serialize this public key as PEM-encoded SPKI with the given LineEnding. Read more
Source§

fn write_public_key_der_file(&self, path: impl AsRef<Path>) -> Result<(), Error>

Available on crate feature std only.
Write ASN.1 DER-encoded public key to the given path. Read more
Source§

fn write_public_key_pem_file( &self, path: impl AsRef<Path>, line_ending: LineEnding, ) -> Result<(), Error>

Available on crate features pem and std only.
Write ASN.1 PEM-encoded public key to the given path. Read more
Source§

impl EncodeRsaPublicKey for RsaPublicKey

Available on crate feature encoding only.
Source§

fn to_pkcs1_der(&self) -> Result<Document>

Serialize a Document containing a PKCS#1-encoded public key.
Source§

fn to_pkcs1_pem(&self, line_ending: LineEnding) -> Result<String, Error>

Available on crate feature pem only.
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>

Available on crate feature std only.
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>

Available on crate features pem and std only.
Write ASN.1 PEM-encoded public key to the given path.
Source§

impl Serialize for RsaPublicKey

Available on crate feature serde only.
Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<RsaPublicKey<'_>> for RsaPublicKey

Available on crate feature encoding only.
Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(pkcs1_key: RsaPublicKey<'_>) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<SubjectPublicKeyInfo<AnyRef<'_>, BitStringRef<'_>>> for RsaPublicKey

Available on crate feature encoding only.
Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(spki: SubjectPublicKeyInfoRef<'_>) -> Result<Self>

Performs the conversion.