๐Ÿ” Deno Crypto

A collection of useful cryptographic algorithms written in Typescript.


๐Ÿงช This project is still in an early stage of development. Expect breaking changes.


โœ” Supported algorithms

Block ciphers

Message Authentication Code algorithms (MACs)

Key Derivation Functions (KDFs)

๐Ÿ“ Examples

AES-128-CBC

import { Aes } from "https://deno.land/x/crypto/aes.ts";
import { Cbc, Padding } from "https://deno.land/x/crypto/block-modes.ts";

const te = new TextEncoder();

const key = te.encode("SuperDuperSecret");
const data = te.encode("DataToBeEncrypted");
const iv = new Uint8Array(16);

// Ciphers have an internal state, you should therefore create
// separate ciphers for encryption and decryption
const cipher = new Cbc(Aes, key, iv, Padding.PKCS7);
const decipher = new Cbc(Aes, key, iv, Padding.PKCS7);

const encrypted = cipher.encrypt(data);
const decrypted = decipher.decrypt(encrypted);

๐Ÿ”” Disclaimer

This repository has not yet received any formal cryptographic and security reviews. USE AT YOUR OWN RISK

Crypto

๐Ÿ” Fastest crypto library for Deno written in pure Typescript. AES, Blowfish, CAST5, DES, 3DES, HMAC, HKDF, PBKDF2

Crypto Info

โญ Stars 34
๐Ÿ”— Homepage deno.land
๐Ÿ”— Source Code github.com
๐Ÿ•’ Last Update 7 months ago
๐Ÿ•’ Created 2 years ago
๐Ÿž Open Issues 1
โž— Star-Issue Ratio 34
๐Ÿ˜Ž Author aykxt