Struct openssl::crypto::dsa::DSA
[−]
[src]
pub struct DSA(_);
Methods
impl DSA
[src]
unsafe fn from_ptr(dsa: *mut DSA) -> DSA
fn generate(size: u32) -> Result<DSA, ErrorStack>
Generate a DSA key pair
For more complicated key generation scenarios see the DSAParams
type
fn private_key_from_pem(buf: &[u8]) -> Result<DSA, ErrorStack>
Reads a DSA private key from PEM formatted data.
fn private_key_from_pem_cb<F>(buf: &[u8], pass_cb: F) -> Result<DSA, ErrorStack> where F: FnOnce(&mut [c_char]) -> usize
Read a private key from PEM supplying a password callback to be invoked if the private key is encrypted.
The callback will be passed the password buffer and should return the number of characters placed into the buffer.
fn private_key_to_pem(&self) -> Result<Vec<u8>, ErrorStack>
Writes an DSA private key as unencrypted PEM formatted data
fn public_key_from_pem(buf: &[u8]) -> Result<DSA, ErrorStack>
Reads an DSA public key from PEM formatted data.
fn public_key_to_pem(&self) -> Result<Vec<u8>, ErrorStack>
Writes an DSA public key as PEM formatted data