spread Uint8Arrays
This commit is contained in:
+1
-7
@@ -57,13 +57,7 @@ export const encryptArrayBuffer = async (
|
|||||||
|
|
||||||
const prefix = new TextEncoder().encode("Salted__");
|
const prefix = new TextEncoder().encode("Salted__");
|
||||||
|
|
||||||
const res = new Uint8Array(
|
const res = new Uint8Array([...prefix, ...salt, ...new Uint8Array(enc)]);
|
||||||
[
|
|
||||||
...prefix,
|
|
||||||
...salt,
|
|
||||||
...new Uint8Array(enc)
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
return bufferToArrayBuffer(res);
|
return bufferToArrayBuffer(res);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user