Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iliazeus/static-secret
a simple-to-use script for embedding secret password-encrypted data into static web pages
https://github.com/iliazeus/static-secret
encryption javascript web-crypto-api
Last synced: 2 days ago
JSON representation
a simple-to-use script for embedding secret password-encrypted data into static web pages
- Host: GitHub
- URL: https://github.com/iliazeus/static-secret
- Owner: iliazeus
- License: mit
- Created: 2024-01-19T11:02:27.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-01-19T12:27:24.000Z (10 months ago)
- Last Synced: 2024-01-20T12:25:12.962Z (10 months ago)
- Topics: encryption, javascript, web-crypto-api
- Language: JavaScript
- Homepage: https://iliazeus.github.io/static-secret/encrypt.html
- Size: 491 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# static-secret.js
`static-secret` is a simple-to-use script for embedding _secret_ password-encrypted data into _static_ web pages.
## Usage
### Encryption
There's a [browser tool].
[browser tool]: https://iliazeus.github.io/static-secret/encrypt.html
Save both the encrypted file and the `data-static-secret` value.
### Embedding with auto-decryption
First, add the script to your web page. You can either reference the GitHub-hosted version:
```html
```
Or you can download the script, put it beside your page and reference your copy:
```html
```
Do not remove the `#decrypt` parameter - that's what enables the auto-decryption feature, so you don't have to write any JavaScript yourself.
Then, embed the encrypted data:
```html
embedding images, audios and videos:embedding downloadable files:
Download!encrypting the contents themselves:
base64 encrypted contents here (check the "Get base64-encoded contents" box).
```To view encrypted files, you will need the same password that was used for encryption. By default, you pass it via the `#p=` parameter, as in this example:
https://iliazeus.github.io/static-secret/example.html#p=kodak
### Advanced
For advanced usage, consult the [source code].
[source code]: ./static-secret.js