Skip to content

Commit 9e226eb

Browse files
committed
Fix documentation regarding interruptStep with modern API
Updates #31
1 parent f3f99d8 commit 9e226eb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ Usage
4444
Derives a key from password and salt and calls callback
4545
with derived key as the only argument.
4646

47-
Calculations are interrupted with setImmediate (or zero setTimeout) at the
48-
given interruptSteps to avoid freezing the browser. If interruptStep is not
49-
given, it defaults to 1000. If it's zero, the callback is called immediately
50-
after the calculation, avoiding setImmediate.
47+
If interruptStep is set, calculations are interrupted with setImmediate (or
48+
zero setTimeout) at the given interruptSteps to avoid freezing the browser.
49+
If it's not set or if set to zero, the callback is called immediately after the
50+
calculation, avoiding setImmediate.
5151

5252
#### Arguments:
5353

@@ -63,7 +63,7 @@ after the calculation, avoiding setImmediate.
6363
* `r` — block size parameter
6464
* `p` — parallelization parameter (default is 1)
6565
* `dkLen` — derived key length (default is 32)
66-
* `interruptStep` — (optional) steps to split calculation with timeouts (defaults to 1000)
66+
* `interruptStep` — (optional) steps to split calculation with timeouts (defaults to 0)
6767
* `encoding` — (optional) result encoding `'base64'` or `'hex'` (result with be a `string`), `'binary'` (result will be a `Uint8Array`) or undefined (result will be an `Array` of bytes).
6868

6969
#### Example:

0 commit comments

Comments
 (0)