Struct openssl::crypto::rsa::RSA
[−]
[src]
pub struct RSA(_);
Methods
impl RSA
[src]
fn from_public_components(n: BigNum, e: BigNum) -> Result<RSA, ErrorStack>
only useful for associating the key material directly with the key, it's safer to use the supplied load and save methods for DER formatted keys.
fn from_private_components(n: BigNum, e: BigNum, d: BigNum, p: BigNum, q: BigNum, dp: BigNum, dq: BigNum, qi: BigNum) -> Result<RSA, ErrorStack>
unsafe fn from_ptr(rsa: *mut RSA) -> RSA
fn generate(bits: u32) -> Result<RSA, ErrorStack>
Generates a public/private key pair with the specified size.
The public exponent will be 65537.
fn private_key_from_pem(buf: &[u8]) -> Result<RSA, ErrorStack>
Reads an RSA private key from PEM formatted data.
fn private_key_from_pem_cb<F>(buf: &[u8], pass_cb: F) -> Result<RSA, ErrorStack> where F: FnOnce(&mut [c_char]) -> usize
Reads an RSA private key from PEM formatted data and supplies a password callback.
fn public_key_from_pem(buf: &[u8]) -> Result<RSA, ErrorStack>
Reads an RSA public key from PEM formatted data.
fn private_key_to_pem(&self) -> Result<Vec<u8>, ErrorStack>
Writes an RSA private key as unencrypted PEM formatted data
fn public_key_to_pem(&self) -> Result<Vec<u8>, ErrorStack>
Writes an RSA public key as PEM formatted data