From 68417a4c153cf8432e048878d473eb4347cccb67 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 26 Apr 2023 13:01:42 -0700 Subject: [PATCH] Env-ify hashing variables, setting the normal defaults Signed-off-by: snipe --- .env.example | 9 +++++++++ config/hashing.php | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index c523ef0c04..fbf5c4cfff 100644 --- a/.env.example +++ b/.env.example @@ -175,6 +175,15 @@ REQUIRE_SAML=false API_THROTTLE_PER_MINUTE=120 CSV_ESCAPE_FORMULAS=true +# -------------------------------------------- +# OPTIONAL: HASHING +# -------------------------------------------- +HASHING_DRIVER='bcrypt' +BCRYPT_ROUNDS=10 +ARGON_MEMORY=1024 +ARGON_THREADS=2 +ARGON_TIME=2 + # -------------------------------------------- # OPTIONAL: SCIM # -------------------------------------------- diff --git a/config/hashing.php b/config/hashing.php index d3c8e2fb22..06f18a0c6d 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -15,7 +15,7 @@ return [ | */ - 'driver' => 'bcrypt', + 'driver' => env('HASHING_DRIVER', 'bcrypt'), /* |-------------------------------------------------------------------------- @@ -44,9 +44,9 @@ return [ */ 'argon' => [ - 'memory' => 1024, - 'threads' => 2, - 'time' => 2, + 'memory' => env('ARGON_MEMORY', 1024), + 'threads' => env('ARGON_THREADS', 2), + 'time' => env('ARGON_TIME', 2), ], ];