comparison benchmark/bun-http-framework-benchmark/dev/adonis/config/hash.ts @ 183:a8976a008a9d

[BenchMark] Added bun bench mark to test seoboe vs other popular benchmarks.
author MrJuneJune <me@mrjunejune.com>
date Fri, 23 Jan 2026 21:19:08 -0800
parents
children
comparison
equal deleted inserted replaced
179:8d17f6e6e290 183:a8976a008a9d
1 /**
2 * Config source: https://git.io/JfefW
3 *
4 * Feel free to let us know via PR, if you find something broken in this config
5 * file.
6 */
7
8 import Env from '@ioc:Adonis/Core/Env'
9 import { hashConfig } from '@adonisjs/core/build/config'
10
11 /*
12 |--------------------------------------------------------------------------
13 | Hash Config
14 |--------------------------------------------------------------------------
15 |
16 | The `HashConfig` relies on the `HashList` interface which is
17 | defined inside `contracts` directory.
18 |
19 */
20 export default hashConfig({
21 /*
22 |--------------------------------------------------------------------------
23 | Default hasher
24 |--------------------------------------------------------------------------
25 |
26 | By default we make use of the argon hasher to hash values. However, feel
27 | free to change the default value
28 |
29 */
30 default: Env.get('HASH_DRIVER', 'scrypt'),
31
32 list: {
33 /*
34 |--------------------------------------------------------------------------
35 | scrypt
36 |--------------------------------------------------------------------------
37 |
38 | Scrypt mapping uses the Node.js inbuilt crypto module for creating
39 | hashes.
40 |
41 | We are using the default configuration recommended within the Node.js
42 | documentation.
43 | https://nodejs.org/api/crypto.html#cryptoscryptpassword-salt-keylen-options-callback
44 |
45 */
46 scrypt: {
47 driver: 'scrypt',
48 cost: 16384,
49 blockSize: 8,
50 parallelization: 1,
51 saltSize: 16,
52 keyLength: 64,
53 maxMemory: 32 * 1024 * 1024,
54 },
55
56 /*
57 |--------------------------------------------------------------------------
58 | Argon
59 |--------------------------------------------------------------------------
60 |
61 | Argon mapping uses the `argon2` driver to hash values.
62 |
63 | Make sure you install the underlying dependency for this driver to work.
64 | https://www.npmjs.com/package/phc-argon2.
65 |
66 | npm install phc-argon2
67 |
68 */
69 argon: {
70 driver: 'argon2',
71 variant: 'id',
72 iterations: 3,
73 memory: 4096,
74 parallelism: 1,
75 saltSize: 16,
76 },
77
78 /*
79 |--------------------------------------------------------------------------
80 | Bcrypt
81 |--------------------------------------------------------------------------
82 |
83 | Bcrypt mapping uses the `bcrypt` driver to hash values.
84 |
85 | Make sure you install the underlying dependency for this driver to work.
86 | https://www.npmjs.com/package/phc-bcrypt.
87 |
88 | npm install phc-bcrypt
89 |
90 */
91 bcrypt: {
92 driver: 'bcrypt',
93 rounds: 10,
94 },
95 },
96 })