hash.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. 'use strict'
  2. /** @type {import('@adonisjs/framework/src/Env')} */
  3. const Env = use('Env')
  4. module.exports = {
  5. /*
  6. |--------------------------------------------------------------------------
  7. | Driver
  8. |--------------------------------------------------------------------------
  9. |
  10. | Driver to be used for hashing values. The same driver is used by the
  11. | auth module too.
  12. |
  13. */
  14. driver: Env.get('HASH_DRIVER', 'bcrypt'),
  15. /*
  16. |--------------------------------------------------------------------------
  17. | Bcrypt
  18. |--------------------------------------------------------------------------
  19. |
  20. | Config related to bcrypt hashing. https://www.npmjs.com/package/bcrypt
  21. | package is used internally.
  22. |
  23. */
  24. bcrypt: {
  25. rounds: 10
  26. },
  27. /*
  28. |--------------------------------------------------------------------------
  29. | Argon
  30. |--------------------------------------------------------------------------
  31. |
  32. | Config related to argon. https://www.npmjs.com/package/argon2 package is
  33. | used internally.
  34. |
  35. | Since argon is optional, you will have to install the dependency yourself
  36. |
  37. |============================================================================
  38. | npm i argon2
  39. |============================================================================
  40. |
  41. */
  42. argon: {
  43. type: 1
  44. }
  45. }