From b2114b3d2c71d41b7b3364a3c0d8a68c450d9a1a Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Sat, 13 Sep 2025 10:08:24 +0700 Subject: [PATCH] feat: publish hashing dan membuat MyConfig --- config/MyConfig.php | 5 ++++ config/hashing.php | 68 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 config/MyConfig.php create mode 100644 config/hashing.php diff --git a/config/MyConfig.php b/config/MyConfig.php new file mode 100644 index 0000000..a3e0d75 --- /dev/null +++ b/config/MyConfig.php @@ -0,0 +1,5 @@ + env('PASSWORD_DEFAULT', 'Minimal8'), +]; diff --git a/config/hashing.php b/config/hashing.php new file mode 100644 index 0000000..356ec10 --- /dev/null +++ b/config/hashing.php @@ -0,0 +1,68 @@ + env('HASH_DRIVER', 'bcrypt'), + + /* + |-------------------------------------------------------------------------- + | Bcrypt Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Bcrypt algorithm. This will allow you + | to control the amount of time it takes to hash the given password. + | + */ + + 'bcrypt' => [ + 'rounds' => env('BCRYPT_ROUNDS', 12), + 'verify' => env('HASH_VERIFY', true), + 'limit' => env('BCRYPT_LIMIT', null), + ], + + /* + |-------------------------------------------------------------------------- + | Argon Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Argon algorithm. These will allow you + | to control the amount of time it takes to hash the given password. + | + */ + + 'argon' => [ + 'memory' => env('ARGON_MEMORY', 65536), + 'threads' => env('ARGON_THREADS', 1), + 'time' => env('ARGON_TIME', 4), + 'verify' => env('HASH_VERIFY', true), + ], + + /* + |-------------------------------------------------------------------------- + | Rehash On Login + |-------------------------------------------------------------------------- + | + | Setting this option to true will tell Laravel to automatically rehash + | the user's password during login if the configured work factor for + | the algorithm has changed, allowing graceful upgrades of hashes. + | + */ + + 'rehash_on_login' => true, + +];