-
-
Save panva/0a69f62d5d1257956d9556a7451889b5 to your computer and use it in GitHub Desktop.
aeskwcrash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modules to control application life and create native browser window | |
const {app} = require('electron') | |
const crypto = require('node:crypto') | |
app.on('ready', () => { | |
(async () => { | |
const bogusWebCrypto = [{ hash: "SHA-256", name: "HMAC" }, true, ["sign"]]; | |
const cek = crypto.randomBytes(16); | |
const cryptoKeyCek = await crypto.webcrypto.subtle.importKey( | |
"raw", | |
cek, | |
...bogusWebCrypto | |
); | |
const cryptoKey = await crypto.webcrypto.subtle.generateKey( | |
{ name: "AES-KW", length: 128 }, | |
false, | |
["wrapKey", "unwrapKey"] | |
); | |
await crypto.webcrypto.subtle.wrapKey("raw", cryptoKeyCek, cryptoKey, "AES-KW") | |
})() | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "unlikely-property-correlate-48cek", | |
"productName": "unlikely-property-correlate-48cek", | |
"description": "My Electron application description", | |
"keywords": [], | |
"main": "./main.js", | |
"version": "1.0.0", | |
"author": "panva", | |
"scripts": { | |
"start": "electron ." | |
}, | |
"dependencies": {}, | |
"devDependencies": { | |
"electron": "20.1.4" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment