Update rand to 0.9

This commit is contained in:
Lennart
2025-06-08 19:56:48 +02:00
parent c05c330601
commit 1d25d6cc70
7 changed files with 11 additions and 16 deletions

View File

@@ -10,13 +10,13 @@ use axum::{
use axum_extra::extract::Host;
use headers::{ContentType, HeaderMapExt};
use http::{HeaderValue, StatusCode, header};
use rand::{Rng, distributions::Alphanumeric};
use rand::{Rng, distr::Alphanumeric};
use rustical_store::auth::{AuthenticationProvider, User};
use serde::Deserialize;
use uuid::Uuid;
pub fn generate_app_token() -> String {
rand::thread_rng()
rand::rng()
.sample_iter(Alphanumeric)
.map(char::from)
.take(64)

View File

@@ -19,6 +19,5 @@ chrono.workspace = true
password-auth.workspace = true
password-hash.workspace = true
uuid.workspace = true
rand.workspace = true
pbkdf2.workspace = true
rustical_ical.workspace = true

View File

@@ -1,8 +1,10 @@
use async_trait::async_trait;
use derive_more::Constructor;
use password_hash::PasswordHasher;
use pbkdf2::{Params, password_hash::SaltString};
use rand::rngs::OsRng;
use pbkdf2::{
Params,
password_hash::{SaltString, rand_core::OsRng},
};
use rustical_store::{
Error, Secret,
auth::{AuthenticationProvider, User, user::AppToken},