@australis/tiny-crypto

Simple passphrase base encryption implementation

Usage no npm install needed!

<script type="module">
  import australisTinyCrypto from 'https://cdn.skypack.dev/@australis/tiny-crypto';
</script>

README

Simple crypto

Implements;

{ encrypt(string): string ; decrypt(string): string }

from passphrase with aes-128-cbc

Install:

yarn add @australis/tiny-crypto

Usage:

import Crypto from "../src";
import { randomBytes } from "crypto";

const secret = randomBytes(10).toString("base64");    
const crypto = new Crypto(secret);
console.log(crypto.decrypt(crypto.encrypt("hello")));
# should print hello