Commit 497b59b
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 83e225b commit 497b59bCopy full SHA for 497b59b
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 |
|---|---|---|
| ||
36 | 36 | |
37 | 37 | |
38 | 38 | |
39 | | - |
| 39 | + |
| 40 | + |
40 | 41 | |
41 | 42 | |
42 | 43 | |
| ||
51 | 52 | |
52 | 53 | |
53 | 54 | |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
54 | 63 | |
55 | 64 | |
56 | 65 | |
|
Collapse file
+17-6Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4718 | 4718 | |
4719 | 4719 | |
4720 | 4720 | |
4721 | | - |
| 4721 | + |
| 4722 | + |
| 4723 | + |
| 4724 | + |
| 4725 | + |
| 4726 | + |
| 4727 | + |
| 4728 | + |
| 4729 | + |
| 4730 | + |
4722 | 4731 | |
4723 | 4732 | |
4724 | 4733 | |
| ||
4727 | 4736 | |
4728 | 4737 | |
4729 | 4738 | |
4730 | | - |
| 4739 | + |
4731 | 4740 | |
4732 | 4741 | |
4733 | 4742 | |
| 4743 | + |
| 4744 | + |
| 4745 | + |
| 4746 | + |
| 4747 | + |
4734 | 4748 | |
4735 | 4749 | |
4736 | 4750 | |
4737 | | - |
4738 | | - |
4739 | | - |
4740 | | - |
| 4751 | + |
4741 | 4752 | |
4742 | 4753 | |
4743 | 4754 | |
|
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