hashing.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Default Hash Driver
  6. |--------------------------------------------------------------------------
  7. |
  8. | This option controls the default hash driver that will be used to hash
  9. | passwords for your application. By default, the bcrypt algorithm is
  10. | used; however, you remain free to modify this option if you wish.
  11. |
  12. | Supported: "bcrypt", "argon", "argon2id"
  13. |
  14. */
  15. 'driver' => env('HASH_DRIVER', 'bcrypt'),
  16. /*
  17. |--------------------------------------------------------------------------
  18. | Bcrypt Options
  19. |--------------------------------------------------------------------------
  20. |
  21. | Here you may specify the configuration options that should be used when
  22. | passwords are hashed using the Bcrypt algorithm. This will allow you
  23. | to control the amount of time it takes to hash the given password.
  24. |
  25. */
  26. 'bcrypt' => [
  27. 'rounds' => env('BCRYPT_ROUNDS', 12),
  28. 'verify' => env('HASH_VERIFY', true),
  29. 'limit' => env('BCRYPT_LIMIT', null),
  30. ],
  31. /*
  32. |--------------------------------------------------------------------------
  33. | Argon Options
  34. |--------------------------------------------------------------------------
  35. |
  36. | Here you may specify the configuration options that should be used when
  37. | passwords are hashed using the Argon algorithm. These will allow you
  38. | to control the amount of time it takes to hash the given password.
  39. |
  40. */
  41. 'argon' => [
  42. 'memory' => env('ARGON_MEMORY', 65536),
  43. 'threads' => env('ARGON_THREADS', 1),
  44. 'time' => env('ARGON_TIME', 4),
  45. 'verify' => env('HASH_VERIFY', true),
  46. ],
  47. /*
  48. |--------------------------------------------------------------------------
  49. | Rehash On Login
  50. |--------------------------------------------------------------------------
  51. |
  52. | Setting this option to true will tell Laravel to automatically rehash
  53. | the user's password during login if the configured work factor for
  54. | the algorithm has changed, allowing graceful upgrades of hashes.
  55. |
  56. */
  57. 'rehash_on_login' => true,
  58. ];