@australis/tiny-crypto
TypeScript icon, indicating that this package has built-in type declarations

0.1.0-2 • Public • Published

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

/@australis/tiny-crypto/

    Package Sidebar

    Install

    npm i @australis/tiny-crypto

    Weekly Downloads

    1

    Version

    0.1.0-2

    License

    MIT

    Unpacked Size

    6.84 kB

    Total Files

    9

    Last publish

    Collaborators

    • d10221