feat: add Minecraft proxy and refresh dependencies
This commit is contained in:
parent
a6a6fc7348
commit
d37cb0926f
47 changed files with 2671 additions and 1005 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use rand::RngCore;
|
||||
use rand::Rng;
|
||||
use sha2::{Digest, Sha256};
|
||||
use std::net::IpAddr;
|
||||
use std::time::{Duration, Instant};
|
||||
|
|
@ -22,7 +22,7 @@ impl Challenge {
|
|||
#[must_use]
|
||||
pub fn generate(difficulty: u8) -> Self {
|
||||
let mut token = [0u8; 32];
|
||||
rand::thread_rng().fill_bytes(&mut token);
|
||||
rand::rng().fill_bytes(&mut token);
|
||||
Self {
|
||||
token,
|
||||
created_at: Instant::now(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue