Commit 1d03df4
crypto: add Hash.prototype.copy() method
Make it possible to clone the internal state of a Hash object
into a new Hash object, i.e., to fork the state of the object.
Fixes: #29903
PR-URL: #29910
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent a1c524d commit 1d03df4Copy full SHA for 1d03df4
File tree
Expand file treeCollapse file tree
5 files changed
+94
-8
lines changedOpen diff view settings
Filter options
- doc/api
- lib/internal/crypto
- src
- test/parallel
Expand file treeCollapse file tree
5 files changed
+94
-8
lines changedOpen diff view settings
Collapse file
+37Lines changed: 37 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1041 | 1041 | |
1042 | 1042 | |
1043 | 1043 | |
| 1044 | + |
| 1045 | + |
| 1046 | + |
| 1047 | + |
| 1048 | + |
| 1049 | + |
| 1050 | + |
| 1051 | + |
| 1052 | + |
| 1053 | + |
| 1054 | + |
| 1055 | + |
| 1056 | + |
| 1057 | + |
| 1058 | + |
| 1059 | + |
| 1060 | + |
| 1061 | + |
| 1062 | + |
| 1063 | + |
| 1064 | + |
| 1065 | + |
| 1066 | + |
| 1067 | + |
| 1068 | + |
| 1069 | + |
| 1070 | + |
| 1071 | + |
| 1072 | + |
| 1073 | + |
| 1074 | + |
| 1075 | + |
| 1076 | + |
| 1077 | + |
| 1078 | + |
| 1079 | + |
| 1080 | + |
1044 | 1081 | |
1045 | 1082 | |
1046 | 1083 | |
|
Collapse file
lib/internal/crypto/hash.js
Copy file name to clipboardExpand all lines: lib/internal/crypto/hash.js+10-1Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
34 | 34 | |
35 | 35 | |
36 | 36 | |
37 | | - |
| 37 | + |
| 38 | + |
38 | 39 | |
39 | 40 | |
40 | 41 | |
| ||
49 | 50 | |
50 | 51 | |
51 | 52 | |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
52 | 61 | |
53 | 62 | |
54 | 63 | |
|
Collapse file
+17-6Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4720 | 4720 | |
4721 | 4721 | |
4722 | 4722 | |
4723 | | - |
| 4723 | + |
| 4724 | + |
| 4725 | + |
| 4726 | + |
| 4727 | + |
| 4728 | + |
| 4729 | + |
| 4730 | + |
| 4731 | + |
| 4732 | + |
4724 | 4733 | |
4725 | 4734 | |
4726 | 4735 | |
| ||
4729 | 4738 | |
4730 | 4739 | |
4731 | 4740 | |
4732 | | - |
| 4741 | + |
4733 | 4742 | |
4734 | 4743 | |
4735 | 4744 | |
| 4745 | + |
| 4746 | + |
| 4747 | + |
| 4748 | + |
| 4749 | + |
4736 | 4750 | |
4737 | 4751 | |
4738 | 4752 | |
4739 | | - |
4740 | | - |
4741 | | - |
4742 | | - |
| 4753 | + |
4743 | 4754 | |
4744 | 4755 | |
4745 | 4756 | |
|
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
591 | 591 | |
592 | 592 | |
593 | 593 | |
594 | | - |
| 594 | + |
595 | 595 | |
596 | 596 | |
597 | 597 | |
|
Collapse file
test/parallel/test-crypto-hash.js
Copy file name to clipboardExpand all lines: test/parallel/test-crypto-hash.js+29Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
192 | 192 | |
193 | 193 | |
194 | 194 | |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | + |
195 | 200 | |
196 | 201 | |
197 | 202 | |
198 | 203 | |
199 | 204 | |
| 205 | + |
| 206 | + |
| 207 | + |
| 208 | + |
200 | 209 | |
201 | 210 | |
202 | 211 | |
| 212 | + |
| 213 | + |
| 214 | + |
| 215 | + |
203 | 216 | |
204 | 217 | |
205 | 218 | |
| ||
249 | 262 | |
250 | 263 | |
251 | 264 | |
| 265 | + |
| 266 | + |
| 267 | + |
| 268 | + |
| 269 | + |
| 270 | + |
| 271 | + |
| 272 | + |
| 273 | + |
| 274 | + |
| 275 | + |
| 276 | + |
| 277 | + |
| 278 | + |
| 279 | + |
| 280 | + |
0 commit comments