Lines Matching defs:Dsa

46     /// use openssl::dsa::Dsa;
50 /// fn create_dsa() -> Result<Dsa<Private>, ErrorStack> {
51 /// let sign = Dsa::generate(2048)?;
58 pub struct Dsa<T>;
59 /// Reference to [`Dsa`].
61 /// [`Dsa`]: struct.Dsa.html
65 impl<T> Clone for Dsa<T> {
66 fn clone(&self) -> Dsa<T> {
72 type Owned = Dsa<T>;
74 fn to_owned(&self) -> Dsa<T> {
77 Dsa::from_ptr(self.as_ptr())
194 impl Dsa<Params> {
197 pub fn from_pqg(p: BigNum, q: BigNum, g: BigNum) -> Result<Dsa<Params>, ErrorStack> {
199 let dsa = Dsa::from_ptr(cvt_p(ffi::DSA_new())?);
208 pub fn generate_params(bits: u32) -> Result<Dsa<Params>, ErrorStack> {
211 let dsa = Dsa::from_ptr(cvt_p(ffi::DSA_new())?);
227 pub fn generate_key(self) -> Result<Dsa<Private>, ErrorStack> {
232 Ok(Dsa::from_ptr(dsa_ptr))
237 impl Dsa<Private> {
241 pub fn generate(bits: u32) -> Result<Dsa<Private>, ErrorStack> {
242 let params = Dsa::generate_params(bits)?;
257 ) -> Result<Dsa<Private>, ErrorStack> {
260 let dsa = Dsa::from_ptr(cvt_p(ffi::DSA_new())?);
270 impl Dsa<Public> {
277 Dsa<Public>,
285 Dsa<Public>,
298 ) -> Result<Dsa<Public>, ErrorStack> {
301 let dsa = Dsa::from_ptr(cvt_p(ffi::DSA_new())?);
311 impl<T> fmt::Debug for Dsa<T> {
393 /// use openssl::dsa::{Dsa, DsaSig};
399 /// let dsa_ref = Dsa::generate(1024).unwrap();
545 Dsa::generate(1024).unwrap();
550 let dsa = Dsa::generate(1024).unwrap();
569 let dsa = Dsa::from_private_components(p, q, g, priv_key, pub_key).unwrap();
584 let dsa = Dsa::from_public_components(p, q, g, pub_key).unwrap();
593 let params = Dsa::generate_params(1024).unwrap();
598 let params2 = Dsa::from_pqg(
613 let dsa_ref = Dsa::generate(1024).unwrap();
622 let priv_key = Dsa::from_private_components(
632 let pub_key = Dsa::from_public_components(
656 let dsa_ref = Dsa::generate(1024).unwrap();
682 let key = Dsa::generate(2048).unwrap();