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

Did not generate encrypted content with "--share" #182

Closed Nigh closed 1 year ago

Nigh commented 1 year ago

I want to generate encrypted content and the hash password at once:

staticrypt .\example\index.html --short -p 123456 --share

But this command just output the hash password only, which the line below could generates the encrypted content.

staticrypt .\example\index.html --short -p 123456

robinmoisson commented 1 year ago

Thanks for reporting - the behavior is as expected but the documentation is wrong, I'll fix that.

Behavior changed in staticrypt v3 which supports encrypting multiple files natively, to allow for getting the share link without having to re-encrypt something. I think another person was confused by the new behavior, so maybe this is debatable. I'd consider it a breaking change to change though, so it's not going to change right away.

If you want to do both in a single command you'll have to do

staticrypt .\example\index.html --short -p 123456 && staticrypt --short -p 123456 --share