add modules to electron export, fix issues when downloading updates

This commit is contained in:
2024-01-18 12:43:46 +01:00
parent 6369c0e8af
commit 6aa0a6c969
17 changed files with 338 additions and 162 deletions

11
electron/cryptoUtil.js Normal file
View File

@@ -0,0 +1,11 @@
const cryptojs = require("crypto-js");
const encrypt = (string, salt) => {
return cryptojs.AES.encrypt(string, salt).toString();
};
const decrypt = (string, salt) => {
return cryptojs.AES.decrypt(string, salt).toString(cryptojs.enc.Utf8);
};
module.exports = { encrypt, decrypt };