StaticSecure 🔒

StaticSecure is an easy way to secure your static projects



Install

<div id="example"></div>
<!-- Somewhere we could put the decrypted text/errors -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js" integrity="sha256-/H4YS+7aYb9kJ5OKhFYPUjSJdrtV6AeyJOtTkw6X72o=" crossorigin="anonymous"></script>
<script src="/path/to/staticsecure.min.js"></script>
<!-- Require CryptoJS and StaticSecure. StaticSecure can be downloaded at  https://staticsecure.glitch.me -->
<script>
staticsecure({"query": "key", "id": "example", "url": "/path/to/encrypted/text.txt"})
/*
query: Where the key is located in the URL. Example: "key" -> "encrypted.html?key=password" 
id: The element where the decrypted text will be displayed. Example: "example" -> <div id="example"></div> (required)
url: A text file of the encrypted message. It can be generated at  https://staticsecure.glitch.me/encrypt.html (required)
*/
</script>
There are two ways to download SecureStatic:
Example
Whitepaper (as suggested by wh0)


Config:

id:
The element id where the decrypted text will be stored.
"example" = <div id="example"></div>
(required)
code:
The code which will be decoded from. May be generated here. (required)
query:
The query tag where the key will be taken from. (Default: "key")
"key" = ?key=[PASSWORD]