Struct openssl::crypto::rsa::RSA [] [src]

pub struct RSA(_);

Methods

impl RSA
[src]

fn from_public_components(n: BigNum, e: BigNum) -> Result<RSASslError>

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<RSASslError>

unsafe fn from_raw(rsa: *mut RSA) -> RSA

the caller should assert that the rsa pointer is valid.

fn private_key_from_pem<R>(reader: &mut R) -> Result<RSASslError> where R: Read

Reads an RSA private key from PEM formatted data.

fn private_key_to_pem<W>(&self, writer: &mut W) -> Result<()SslError> where W: Write

Writes an RSA private key as unencrypted PEM formatted data

fn public_key_from_pem<R>(reader: &mut R) -> Result<RSASslError> where R: Read

Reads an RSA public key from PEM formatted data.

fn public_key_to_pem<W>(&self, writer: &mut W) -> Result<()SslError> where W: Write

Writes an RSA public key as PEM formatted data

fn size(&self) -> Result<u32SslError>

fn sign(&self, hash: Type, message: &[u8]) -> Result<Vec<u8>, SslError>

fn verify(&self, hash: Type, message: &[u8], sig: &[u8]) -> Result<boolSslError>

fn as_ptr(&self) -> *mut RSA

fn n(&self) -> Result<BigNumSslError>

fn has_n(&self) -> bool

fn d(&self) -> Result<BigNumSslError>

fn e(&self) -> Result<BigNumSslError>

fn has_e(&self) -> bool

fn p(&self) -> Result<BigNumSslError>

fn q(&self) -> Result<BigNumSslError>

Trait Implementations

impl Drop for RSA
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more

impl Debug for RSA
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.