pub trait PemEncode: Sealed + Encode {
// Required methods
fn as_pkcs1_pem(&self) -> Result<String, Error>;
fn as_pkcs8_pem(&self) -> Result<String, Error>;
fn as_pkcs1_pem_custom_ending(
&self,
line_ending: LineEnding,
) -> Result<String, Error>;
fn as_pkcs8_pem_custom_ending(
&self,
line_ending: LineEnding,
) -> Result<String, Error>;
}
Expand description
Trait for encoding the keys and wrapping them in the PEM format
Required Methods§
Sourcefn as_pkcs1_pem(&self) -> Result<String, Error>
fn as_pkcs1_pem(&self) -> Result<String, Error>
Encode in the PKCS#1 format, PEM encoded
Sourcefn as_pkcs8_pem(&self) -> Result<String, Error>
fn as_pkcs8_pem(&self) -> Result<String, Error>
Encode in the PKCS#8 format, PEM encoded
Sourcefn as_pkcs1_pem_custom_ending(
&self,
line_ending: LineEnding,
) -> Result<String, Error>
fn as_pkcs1_pem_custom_ending( &self, line_ending: LineEnding, ) -> Result<String, Error>
Encode in the PKCS#1 format, PEM encoded with a custom line ending
Sourcefn as_pkcs8_pem_custom_ending(
&self,
line_ending: LineEnding,
) -> Result<String, Error>
fn as_pkcs8_pem_custom_ending( &self, line_ending: LineEnding, ) -> Result<String, Error>
Encode in the PKCS#8 format, PEM encoded with a custom line ending
Implementations on Foreign Types§
Source§impl PemEncode for RSAPrivateKey
impl PemEncode for RSAPrivateKey
Source§fn as_pkcs1_pem_custom_ending(
&self,
line_ending: LineEnding,
) -> Result<String, Error>
fn as_pkcs1_pem_custom_ending( &self, line_ending: LineEnding, ) -> Result<String, Error>
Encode with a different line ending
Source§fn as_pkcs8_pem_custom_ending(
&self,
line_ending: LineEnding,
) -> Result<String, Error>
fn as_pkcs8_pem_custom_ending( &self, line_ending: LineEnding, ) -> Result<String, Error>
Encode with a different line ending
Source§impl PemEncode for RSAPublicKey
impl PemEncode for RSAPublicKey
Source§fn as_pkcs1_pem_custom_ending(
&self,
line_ending: LineEnding,
) -> Result<String, Error>
fn as_pkcs1_pem_custom_ending( &self, line_ending: LineEnding, ) -> Result<String, Error>
Encode with a different line ending
Source§fn as_pkcs8_pem_custom_ending(
&self,
line_ending: LineEnding,
) -> Result<String, Error>
fn as_pkcs8_pem_custom_ending( &self, line_ending: LineEnding, ) -> Result<String, Error>
Encode with a different line ending