StatiCrypt uses AES-256 and WebCrypto to encrypt your HTML file with your long password and return a static page including a password prompt and the javascript decryption logic that you can safely upload anywhere (see what the page looks like). This means you can password protect the content of your public static HTML file, without any back-end - serving it over Netlify, GitHub pages, etc. You can encrypt a file online in your browser (client side). StatiCrypt uses WebCrypto to generate a static, password protected page that can be decrypted in-browser. You can then just send or upload the generated page to a place serving static content (github pages, for example) and you're done: the page will prompt users for a password, and the javascript will decrypt and load your HTML, all done in the browser.
Features
- Staticrypt is available through npm as a CLI
- Encrypt a file and get a shareable link containing the hashed password
- Pin the salt to use staticrypt in your CI in a build step
- Encrypt a file with the password in an environment variable
- Encrypt all html files from a directory and put them in a encrypted/ directory
- Customize the password prompt