Hello, I would like to make a new way to protect resources.
This way would be to put a password to the package.nw file.
This file is a zip file.
I would put a password to this zip file using winrar.
With winrar you can create compressed files with a password.
Then I tell NWjs that he should use this password to unzip the file.
This is possible? Can be done?.
There is honestly no point in doing this and I'd generally recommend working and finishing up your game instead of using time on this. HERE is an issue regarding this from the past about package.nw/zip password protection.
There might be complicated workarounds with NPM modules but I'm not familiar with both NPM and JS to provide something useful, putting aside the fact that your game could run slower or take forever to start up with something like this implemented.
One thing you could do is "hide" it inside the exe file (How To: Secure/Hide Your Game Assets), which at least would make it more difficult for people that don't know how to reverse the process to access it.
Again speaking from personal experience, don't waste your time on this and finish your game instead. If someone really wants to crack your game, that individual will manage to do it even if you use super expensive security systems like Denuvo.