Skip to content

Commit

Permalink
fix: app start argon2 v2 config slowness
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrien Chapelet committed Oct 25, 2023
1 parent 9b88dae commit 3bd4182
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ async fn main() -> anyhow::Result<()> {
.collection(users::REPOSITORY_NAME);

let salt = std::env::var("SECRET_KEY").unwrap_or_else(|_| "0123".repeat(16));
let config = Config::default();

let hashed_password =
argon2::hash_encoded("password".as_bytes(), salt.as_bytes(), &config).unwrap();

argon2::hash_encoded("password".as_bytes(), salt.as_bytes(), &Config::original()).unwrap();
let admin_user = User {
_id: ObjectId::new(),
first_name: "Adrien".to_string(),
Expand Down

0 comments on commit 3bd4182

Please sign in to comment.