spread Uint8Arrays

This commit is contained in:
fyears 2021-11-05 01:21:33 +08:00
parent 2551462003
commit 358311e8ac

View File

@ -57,13 +57,7 @@ export const encryptArrayBuffer = async (
const prefix = new TextEncoder().encode("Salted__");
const res = new Uint8Array(
[
...prefix,
...salt,
...new Uint8Array(enc)
]
);
const res = new Uint8Array([...prefix, ...salt, ...new Uint8Array(enc)]);
return bufferToArrayBuffer(res);
};