crytop
v0.2.0
Published
A simple encryption tool powered by Web Crypto API
Maintainers
Readme
Crytop
A simple encryption tool powered by Web Crypto API
Installation
In a browser:
<script src="https://unpkg.com/crytop"></script><script type="module">
import Crytop from "https://unpkg.com/crytop/dist/crytop.esm.js";
</script>Using npm:
$ npm install crytopUsage example
import Crytop from "crytop";
(async () => {
const message = "Hello World!";
const password = "1234";
const encrypted = await Crytop.encrypt(message, password);
console.log(encrypted); // WYCn8qIJNoNlVU0pV/LuDg==
const decrypted = await Crytop.decrypt(encrypted, password);
console.log(message === decrypted); // true
})()