fix length
This commit is contained in:
parent
f04017e05b
commit
60d5b78df0
@ -58,11 +58,12 @@ 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.byteLength + salt.byteLength + enc.byteLength
|
[
|
||||||
|
...prefix,
|
||||||
|
...salt,
|
||||||
|
...new Uint8Array(enc)
|
||||||
|
]
|
||||||
);
|
);
|
||||||
res.set(new Uint8Array(prefix));
|
|
||||||
res.set(new Uint8Array(salt));
|
|
||||||
res.set(new Uint8Array(enc));
|
|
||||||
|
|
||||||
return bufferToArrayBuffer(res);
|
return bufferToArrayBuffer(res);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user