Commit 4957562
crypto: DRY type checking
Factor out some common code. The `checkUint()` function will also be
used in a follow-up commit that adds scrypt support to core.
PR-URL: #20816
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>1 parent 4a54ebc commit 4957562Copy full SHA for 4957562
Expand file treeCollapse file tree
3 files changed
+26
-24
lines changedOpen diff view settings
Collapse file
lib/internal/crypto/pbkdf2.js
Copy file name to clipboardExpand all lines: lib/internal/crypto/pbkdf2.js+7-21Lines changed: 7 additions & 21 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | | - |
8 | 7 | |
9 | 8 | |
10 | 9 | |
| 10 | + |
11 | 11 | |
12 | | - |
13 | 12 | |
14 | 13 | |
15 | 14 | |
16 | 15 | |
17 | | - |
18 | | - |
19 | | - |
20 | 16 | |
21 | 17 | |
22 | 18 | |
| ||
39 | 35 | |
40 | 36 | |
41 | 37 | |
42 | | - |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
49 | | - |
50 | | - |
51 | | - |
52 | | - |
53 | | - |
54 | | - |
55 | | - |
56 | | - |
57 | | - |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
58 | 44 | |
59 | 45 | |
60 | 46 | |
|
Collapse file
+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
77 | 77 | |
78 | 78 | |
79 | 79 | |
80 | | - |
| 80 | + |
81 | 81 | |
82 | 82 | |
83 | 83 | |
| ||
114 | 114 | |
115 | 115 | |
116 | 116 | |
117 | | - |
| 117 | + |
118 | 118 | |
119 | 119 | |
120 | 120 | |
|
Collapse file
lib/internal/crypto/util.js
Copy file name to clipboardExpand all lines: lib/internal/crypto/util.js+17-1Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
15 | 15 | |
16 | 16 | |
17 | 17 | |
18 | | - |
| 18 | + |
| 19 | + |
19 | 20 | |
20 | 21 | |
21 | 22 | |
| ||
25 | 26 | |
26 | 27 | |
27 | 28 | |
| 29 | + |
| 30 | + |
| 31 | + |
28 | 32 | |
29 | 33 | |
30 | 34 | |
| ||
84 | 88 | |
85 | 89 | |
86 | 90 | |
| 91 | + |
87 | 92 | |
88 | 93 | |
89 | 94 | |
| ||
94 | 99 | |
95 | 100 | |
96 | 101 | |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
97 | 112 | |
98 | 113 | |
| 114 | + |
99 | 115 | |
100 | 116 | |
101 | 117 | |
|
0 commit comments