v0.1.0
Pure Javascript/Typescript Crypto Implementation for Deno. AES, RSA, HMAC, and TOTP
Attributes
Very Popular
Repository
Current version released
4 years ago
Dependencies
std
God Crypto
A pure Javascript/Typescript cryptography implementation.
Usage
import { RSA } from "https://github.com/invisal/god-crypto/raw/master/rsa.ts";
const publicKey = RSA.parseKey(Deno.readTextFileSync('./public.pem'));
RSA.encrypt("Hello World", publicKey); // Default OAEP SHA1
RSA.encrypt("Hello World", publicKey, { padding: "oaep", hash: "sha256" });
RSA.encrypt("Hello World", publicKey, { padding: "pkcs1" });
const privateKey = RSA.parseKey(Deno.readTextFileSync('./private.pem'));
RSA.decrypt(ciperText, privateKey);