hashing.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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"
  13. |
  14. */
  15. 'driver' => 'bcrypt',
  16. /*
  17. |--------------------------------------------------------------------------
  18. | bcrypt options
  19. |--------------------------------------------------------------------------
  20. |
  21. | We could define the number of rounds the bcrypt algo will be using.
  22. |
  23. | rounds: The two digit cost parameter is the base-2 logarithm of the
  24. | iteration count for the underlying Blowfish-based hashing
  25. | algorithmeter and must be in range 04-31, values outside this
  26. | range will cause crypt() to fail.
  27. | (default: 10)
  28. */
  29. 'bcrypt' => [
  30. 'rounds' => 10,
  31. ],
  32. /*
  33. |--------------------------------------------------------------------------
  34. | argon options
  35. |--------------------------------------------------------------------------
  36. |
  37. | These settings could be adjusted depending on your hardware.
  38. |
  39. | time: Maximum amount of time it may take to compute the Argon2 hash.
  40. | (default: 2)
  41. |
  42. | memory: Maximum memory (in bytes) that may be used to compute the
  43. | Argon2 hash.
  44. | (default : 1024)
  45. |
  46. | threads: Number of threads to use for computing the Argon2 hash.
  47. | (default : 2)
  48. |
  49. */
  50. 'argon' => [
  51. 'time' => 2,
  52. 'memory' => 1024,
  53. 'threads' => 2,
  54. ],
  55. ];