Struct openssl::dsa::Dsa
[−]
[src]
pub struct Dsa(_);
Methods
impl Dsa
[src]
fn generate(bits: u32) -> Result<Dsa, ErrorStack>
Generate a DSA key pair.
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 public_key_from_pem(buf: &[u8]) -> Result<Dsa, ErrorStack>
Reads an DSA public key from PEM formatted data.
Methods from Deref<Target=DsaRef>
fn private_key_to_pem(&self) -> Result<Vec<u8>, ErrorStack>
Writes an DSA private key as unencrypted PEM formatted data
fn public_key_to_pem(&self) -> Result<Vec<u8>, ErrorStack>
Writes an DSA public key as PEM formatted data
fn size(&self) -> Option<u32>
fn p(&self) -> Option<&BigNumRef>
fn q(&self) -> Option<&BigNumRef>
fn g(&self) -> Option<&BigNumRef>
fn has_public_key(&self) -> bool
fn has_private_key(&self) -> bool
Trait Implementations
impl OpenSslType for Dsa
[src]
type CType = DSA
The raw C type.
type Ref = DsaRef
The type representing a reference to this type.
unsafe fn from_ptr(ptr: *mut DSA) -> Dsa
Constructs an instance of this type from its raw type.
impl Drop for Dsa
[src]
impl Deref for Dsa
[src]
type Target = DsaRef
The resulting type after dereferencing
fn deref(&self) -> &DsaRef
The method called to dereference a value