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

Generate a DSA key pair For more complicated key generation scenarios see the DSAParams type

fn private_key_from_pem(buf: &[u8]) -> Result<DSAErrorStack>

Reads a DSA private key from PEM formatted data.

fn private_key_from_pem_cb<F>(buf: &[u8], pass_cb: F) -> Result<DSAErrorStack> 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<DSAErrorStack>

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

fn size(&self) -> Option<u32>

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

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

fn as_ptr(&self) -> *mut DSA

fn p<'a>(&'a self) -> Option<BigNumRef<'a>>

fn q<'a>(&'a self) -> Option<BigNumRef<'a>>

fn g<'a>(&'a self) -> Option<BigNumRef<'a>>

fn has_public_key(&self) -> bool

fn has_private_key(&self) -> bool

Trait Implementations

impl Drop for DSA
[src]

fn drop(&mut self)

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

impl Debug for DSA
[src]

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

Formats the value using the given formatter.