update iris
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
use ed25519_dalek::SigningKey;
|
||||
use rand::{
|
||||
SeedableRng,
|
||||
rngs::{OsRng, StdRng},
|
||||
};
|
||||
|
||||
pub struct Account {
|
||||
device_key: SigningKey,
|
||||
account_key: SigningKey,
|
||||
}
|
||||
|
||||
impl Account {
|
||||
pub fn new() -> Account {
|
||||
let mut csprng = StdRng::try_from_rng(&mut OsRng).unwrap();
|
||||
let device_key = SigningKey::generate(&mut csprng);
|
||||
let account_key = SigningKey::generate(&mut csprng);
|
||||
Account {
|
||||
device_key,
|
||||
account_key,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user