| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ed8cee6 commit def96ae
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -44,23 +44,21 @@ function scrypt(password, salt, keylen, options, callback = defaults) { | |||
| 44 | 44 | callback.call(wrap, null, keybuf.toString(encoding)); | |
| 45 | 45 | }; | |
| 46 | 46 | ||
| 47 | - handleError(keybuf, password, salt, N, r, p, maxmem, wrap); | ||
| 47 | + handleError(_scrypt(keybuf, password, salt, N, r, p, maxmem, wrap)); | ||
| 48 | 48 | } | |
| 49 | 49 | ||
| 50 | 50 | function scryptSync(password, salt, keylen, options = defaults) { | |
| 51 | 51 | options = check(password, salt, keylen, options); | |
| 52 | 52 | const { N, r, p, maxmem } = options; | |
| 53 | 53 | ({ password, salt, keylen } = options); | |
| 54 | 54 | const keybuf = Buffer.alloc(keylen); | |
| 55 | - handleError(keybuf, password, salt, N, r, p, maxmem); | ||
| 55 | + handleError(_scrypt(keybuf, password, salt, N, r, p, maxmem)); | ||
| 56 | 56 | const encoding = getDefaultEncoding(); | |
| 57 | 57 | if (encoding === 'buffer') return keybuf; | |
| 58 | 58 | return keybuf.toString(encoding); | |
| 59 | 59 | } | |
| 60 | 60 | ||
| 61 | - function handleError(keybuf, password, salt, N, r, p, maxmem, wrap) { | ||
| 62 | - const ex = _scrypt(keybuf, password, salt, N, r, p, maxmem, wrap); | ||
| 63 | - | ||
| 61 | + function handleError(ex) { | ||
| 64 | 62 | if (ex === undefined) | |
| 65 | 63 | return; | |
| 66 | 64 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments