35c914baa6
This reverts commitd7a3545be1
, reversing changes made to1da06c156c
.
17 lines
370 B
Rust
17 lines
370 B
Rust
use super::{PublicKey, SecretKey};
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
pub struct Keypair {
|
|
pub sk: SecretKey,
|
|
pub pk: PublicKey,
|
|
}
|
|
|
|
impl Keypair {
|
|
/// Instantiate a Keypair using SecretKey::random().
|
|
pub fn random() -> Self {
|
|
let sk = SecretKey::random();
|
|
let pk = PublicKey::from_secret_key(&sk);
|
|
Keypair { sk, pk }
|
|
}
|
|
}
|