You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Blake1 is legacy hash, one of SHA3 proposals. It is rarely used anywhere. See [pdf](https://www.aumasson.jp/blake/blake.pdf).
224
-
* Blake2 is popular fast hash. blake2b focuses on 64-bit platforms while blake2s is for 8-bit to 32-bit ones. See[RFC 7693](https://datatracker.ietf.org/doc/html/rfc7693), [Website](https://www.blake2.net)
225
-
* Blake3 is faster, reduced-round blake2. See [Website & specs](https://blake3.io)
221
+
- Blake1 is legacy hash, one of SHA3 proposals. It is rarely used anywhere. See [pdf](https://www.aumasson.jp/blake/blake.pdf).
222
+
- Blake2 is popular fast hash. blake2b focuses on 64-bit platforms while blake2s is for 8-bit to 32-bit ones. See [RFC 7693](https://datatracker.ietf.org/doc/html/rfc7693), [Website](https://www.blake2.net)
223
+
- Blake3 is faster, reduced-round blake2. See [Website & specs](https://blake3.io)
226
224
227
225
#### sha1: legacy hash
228
226
@@ -313,27 +311,26 @@ Conforms to [RFC 7914](https://datatracker.ietf.org/doc/html/rfc7914),
313
311
-`onProgress` can be used with async version of the function to report progress to a user.
314
312
-`maxmem` prevents DoS and is limited to `1GB + 1KB` (`2**30 + 2**10`), but can be adjusted using formula: `N * r * p * 128 + (128 * r * p)`
315
313
316
-
Time it takes to derive Scrypt key under different values of N (2**N) on Apple M2 (mobile phones can be 1x-4x slower):
314
+
Time it takes to derive Scrypt key under different values of N (2\*\*N) on Apple M2 (mobile phones can be 1x-4x slower):
317
315
318
-
| N pow | Time |
319
-
|----|-------|
320
-
| 16 | 0.17s |
321
-
| 17 | 0.35s |
322
-
| 18 | 0.7s |
323
-
| 19 | 1.4s |
324
-
| 20 | 2.9s |
325
-
| 21 | 5.6s |
326
-
| 22 | 11s |
327
-
| 23 | 26s |
328
-
| 24 | 56s |
316
+
| N pow | Time |
317
+
|----- |-----|
318
+
| 16 | 0.17s |
319
+
| 17 | 0.35s |
320
+
| 18 | 0.7s |
321
+
| 19 | 1.4s |
322
+
| 20 | 2.9s |
323
+
| 21 | 5.6s |
324
+
| 22 | 11s |
325
+
| 23 | 26s |
326
+
| 24 | 56s |
329
327
330
328
> [!NOTE]
331
329
> We support N larger than `2**20` where available, however,
332
330
> not all JS engines support >= 2GB ArrayBuffer-s.
333
331
> When using such N, you'll need to manually adjust `maxmem`, using formula above.
334
332
> Other JS implementations don't support large N-s.
335
333
336
-
337
334
#### argon2
338
335
339
336
```ts
@@ -549,12 +546,12 @@ The current performance is good enough when compared to other projects; SHA256 t
549
546
550
547
`test/misc` directory contains implementations of loop unrolling and md5.
551
548
552
-
*`npm install && npm run build && npm test` will build the code and run tests.
553
-
*`npm run lint` / `npm run format` will run linter / fix linter issues.
554
-
*`npm run bench` will run benchmarks, which may need their deps first (`npm run bench:install`)
555
-
*`cd build && npm install && npm run build:release` will build single file
556
-
* There is **additional** 20-min DoS test `npm run test:dos` and 2-hour "big" multicore test `npm run test:big`.
557
-
See [our approach to testing](./test/README.md)
549
+
-`npm install && npm run build && npm test` will build the code and run tests.
550
+
-`npm run lint` / `npm run format` will run linter / fix linter issues.
551
+
-`npm run bench` will run benchmarks, which may need their deps first (`npm run bench:install`)
552
+
-`cd build && npm install && npm run build:release` will build single file
553
+
- There is **additional** 20-min DoS test `npm run test:dos` and 2-hour "big" multicore test `npm run test:big`.
554
+
See [our approach to testing](./test/README.md)
558
555
559
556
Check out [github.com/paulmillr/guidelines](https://github.com/paulmillr/guidelines)
0 commit comments