| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d5efecd commit faceae4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -98,8 +98,8 @@ function check(password, salt, keylen, options) { | |||
| 98 | 98 | ||
| 99 | 99 | let { N, r, p, maxmem } = defaults; | |
| 100 | 100 | if (options && options !== defaults) { | |
| 101 | - let has_N, has_r, has_p; | ||
| 102 | - if (has_N = (options.N !== undefined)) { | ||
| 101 | + const has_N = options.N !== undefined; | ||
| 102 | + if (has_N) { | ||
| 103 | 103 | N = options.N; | |
| 104 | 104 | validateUint32(N, 'N'); | |
| 105 | 105 | } | |
@@ -108,7 +108,8 @@ function check(password, salt, keylen, options) { | |||
| 108 | 108 | N = options.cost; | |
| 109 | 109 | validateUint32(N, 'cost'); | |
| 110 | 110 | } | |
| 111 | - if (has_r = (options.r !== undefined)) { | ||
| 111 | + const has_r = (options.r !== undefined); | ||
| 112 | + if (has_r) { | ||
| 112 | 113 | r = options.r; | |
| 113 | 114 | validateUint32(r, 'r'); | |
| 114 | 115 | } | |
@@ -117,7 +118,8 @@ function check(password, salt, keylen, options) { | |||
| 117 | 118 | r = options.blockSize; | |
| 118 | 119 | validateUint32(r, 'blockSize'); | |
| 119 | 120 | } | |
| 120 | - if (has_p = (options.p !== undefined)) { | ||
| 121 | + const has_p = options.p !== undefined; | ||
| 122 | + if (has_p) { | ||
| 121 | 123 | p = options.p; | |
| 122 | 124 | validateUint32(p, 'p'); | |
| 123 | 125 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments