work
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use rand::TryRngCore;
|
||||
use rand::TryRng;
|
||||
|
||||
#[repr(u32)]
|
||||
#[derive(Debug, bitcode::Encode, bitcode::Decode)]
|
||||
@@ -21,6 +21,7 @@ pub enum ServerMsgInst {
|
||||
pub struct CreateAccountV0 {
|
||||
pub username: String,
|
||||
pub password: String,
|
||||
pub token: String,
|
||||
pub login_key: LoginKeyV0,
|
||||
}
|
||||
|
||||
@@ -35,7 +36,7 @@ impl LoginKeyV0 {
|
||||
|
||||
pub fn new() -> Self {
|
||||
let mut key = [0u8; Self::BYTE_LEN];
|
||||
rand::rngs::OsRng
|
||||
rand::rngs::SysRng
|
||||
.try_fill_bytes(&mut key)
|
||||
.expect("failed to generate random key");
|
||||
Self(key.to_vec())
|
||||
|
||||
Reference in New Issue
Block a user