Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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