Commit 1be2d88
committed
crypto: avoid temporary Uint8Array in BufferSource normalization
Replace TypedArrayPrototypeSlice(new Uint8Array(buf, off, len)) with
new Uint8Array(ArrayBufferPrototypeSlice(buf, off, off + len)) in
normalizeAlgorithm. This eliminates a throwaway view allocation per
BufferSource member during algorithm normalization.
Signed-off-by: Filip Skokan <panva.ip@gmail.com>1 parent 2eb5ef6 commit 1be2d88
1 file changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
615 | 616 | | |
616 | 617 | | |
617 | 618 | | |
| |||
0 commit comments