Rejigger the SSHKey trait a little more cleanly.
This commit is contained in:
@@ -13,6 +13,7 @@ pub use self::public::*;
|
||||
use cryptonum::unsigned::*;
|
||||
use rand::Rng;
|
||||
use rand::distributions::Standard;
|
||||
use super::KeyPair;
|
||||
|
||||
pub struct DSAKeyPair<P: DSAParameters>
|
||||
{
|
||||
@@ -20,6 +21,17 @@ pub struct DSAKeyPair<P: DSAParameters>
|
||||
pub public: DSAPubKey<P>
|
||||
}
|
||||
|
||||
impl<P: DSAParameters> KeyPair for DSAKeyPair<P>
|
||||
{
|
||||
type Private = DSAPrivKey<P>;
|
||||
type Public = DSAPubKey<P>;
|
||||
|
||||
fn new(public: DSAPubKey<P>, private: DSAPrivKey<P>) -> DSAKeyPair<P>
|
||||
{
|
||||
DSAKeyPair{ private, public }
|
||||
}
|
||||
}
|
||||
|
||||
pub trait DSAKeyGeneration
|
||||
{
|
||||
type Params;
|
||||
|
||||
Reference in New Issue
Block a user