mirror of
https://github.com/mileswolfallen2/gelectron.git
synced 2026-12-05 16:30:40 +00:00
- Created main.js for the application logic, including tests for Electron app properties and methods. - Added package.json to define app metadata. - Included necessary code signature files for macOS app distribution. - Implemented basic window management and event handling in the app.
31 lines
630 B
JavaScript
31 lines
630 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Gelectron - safeStorage module (Electron compatible)
|
|
*/
|
|
|
|
const safeStorage = {
|
|
isAvailable() {
|
|
return true;
|
|
},
|
|
|
|
async encryptString(plaintext) {
|
|
// Basic obfuscation; in production, this routes through the native keyring
|
|
return Buffer.from(plaintext).toString('base64');
|
|
},
|
|
|
|
async decryptString(encrypted) {
|
|
return Buffer.from(encrypted, 'base64').toString('utf-8');
|
|
},
|
|
|
|
async encryptBuffer(buffer) {
|
|
return Buffer.from(buffer).toString('base64');
|
|
},
|
|
|
|
async decryptBuffer(encrypted) {
|
|
return Buffer.from(encrypted, 'base64');
|
|
},
|
|
};
|
|
|
|
module.exports = safeStorage;
|