We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb849a7 commit 098d35fCopy full SHA for 098d35f
app/main/index.ts
@@ -239,9 +239,9 @@ function createMainWindow(): BrowserWindow {
239
try {
240
// Check that the data on the clipboard was encrypted to the key.
241
const data = Buffer.from(clipboard.readText(), "hex");
242
- const iv = data.slice(0, 12);
243
- const ciphertext = data.slice(12, -16);
244
- const authTag = data.slice(-16);
+ const iv = data.subarray(0, 12);
+ const ciphertext = data.subarray(12, -16);
+ const authTag = data.subarray(-16);
245
const decipher = crypto.createDecipheriv("aes-256-gcm", key, iv, {
246
authTagLength: 16,
247
});
0 commit comments