robinmoisson / staticrypt

Password protect a static HTML page, decrypted in-browser in JS with no dependency. No server logic needed.
https://robinmoisson.github.io/staticrypt/
MIT License
7.1k stars 431 forks source link

Possible to lock folders? #199

Closed LebbieTheLuke closed 1 month ago

LebbieTheLuke commented 3 months ago

I was making a github pages site and was looking for a way to lock a entire folder, until the password is entered. Is this possible with staticrypt? thanks.

sanbei101 commented 2 months ago

你的需求其实只用锁住index.html就可以实现了,不需要锁住文件夹的吧

tree .
.
├── assets
│   └── index-p2364_JT.js
├── index.html
└── vite.svg
robinmoisson commented 2 months ago

So I don't know if that's still relevant to you @LebbieTheLuke - can you detail more what's in your folder?

StatiCrypt can encrypt all html files in your folder (you just have to run staticrypt -r folder and it'll be in the encrypted folder) - you can check out the examples. The JS and other files won't be encrypted though, so they should not contain any secret information.

Let me know if you have other questions, and I'll close the issue otherwise.

(@sanbei101 google translate tells me your comment is on topic so thanks for that, though let's keep it to English as a common language)

robinmoisson commented 1 month ago

Closing, feel free to re-open if needed.