https://github.com/richardjennings/precrypt
AES GCM Encrypted HTML, JS, CSS Loader SPA
https://github.com/richardjennings/precrypt
aes-gcm encryption javascript webcrypto-api
Last synced: 4 months ago
JSON representation
AES GCM Encrypted HTML, JS, CSS Loader SPA
- Host: GitHub
- URL: https://github.com/richardjennings/precrypt
- Owner: richardjennings
- Created: 2024-04-28T13:46:49.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-03T07:49:18.000Z (almost 2 years ago)
- Last Synced: 2024-06-19T11:27:24.858Z (almost 2 years ago)
- Topics: aes-gcm, encryption, javascript, webcrypto-api
- Language: Go
- Homepage:
- Size: 75.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PreCrypt
PreCrypt generates a HTML page which can self load embedded AES GCM encrypted HTML, CSS, Javascript when a correct
passcode is entered.
An example is available on [Github Pages](https://richardjennings.github.io/precrypt/).
## CLI Usage
Key is hex encoded and is generated if not supplied.
```
precrypt --html example/index.html --css example/style.css --js example/index.js --key 329625b9767075c799e90499c59f4e775c0c0ca8c8320b99fc485ba68add025b index.html
```
## Library Usage
```
err := precrypt.Render(precrypt.RenderOptions{
HtmlFiles: []string{"example/index.html"},
CssFiles: []string{"example/style.css"},
JsFiles: []string{"example/index.js"},
Key: []byte{"passphrasewhichneedstobe32bytes!"},
Out: os.Stdout,
}
```