Skip to content

Commit 5a0451b

Browse files
committed
refactor: improve performance with the subarray method
1 parent c1069f7 commit 5a0451b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ export async function decryptSymmetricallyText(
8888
return (
8989
textDecoder.decode(
9090
await crypto.subtle.decrypt(
91-
{ name: encryptionAlgorithm, iv: valueInt8Arr.slice(0, ivBytesLength) },
91+
{ name: encryptionAlgorithm, iv: valueInt8Arr.subarray(0, ivBytesLength) },
9292
key,
93-
valueInt8Arr.slice(ivBytesLength)
93+
valueInt8Arr.subarray(ivBytesLength)
9494
)
9595
)
9696
)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "singlecrypt-text",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"author": "Stefan Samson <ss42701@outlook.com> (https://ssbit01.github.io/)",
55
"repository": "github:SSbit01/singlecrypt-text",
66
"main": "index.js",

0 commit comments

Comments
 (0)