electron-json-storage
electron-json-storage copied to clipboard
Feature request: obfuscate file
Right now JSON files are saved in plain text that anyone can open.
It would be great if there was a simple API of saving and retrieving obfuscated files.
That would be nice indeed. It could be cryptographed with some key inside the app itself. That is, only the app can decryptograph the file and use it properly.
It should be a global and/or per operation option (eg: storage.cryptkey = 'xxx' and storage.set(key, data, cryptkey))
Yep, that was what I was thinking. :)
If I have some time later this week I could implement that.
Would a PR for this feature be accepted?
Hey there!
This would be awesome, happy to take a PR for this feature! I really have little time to spare, at least this week, but don't hesitate in pinging me if I can help with anything.
electron-store supports encrypting the config file.
It would be better to have some pluggable architecture to plug any custom encode/decode, (compress/uncompress, obfuscate, ...) code. Then, some default encryption implementation may be provided, too.