From 062d8df713b37ad9f1990b5515c7903747944eb8 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 16 Oct 2022 03:27:08 +0200 Subject: [PATCH] readme --- README.md | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 1ddf729..1bca4a5 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,15 @@ > > _hidden, concealed. secret._ -High level wrapper around the [node native crypto API](https://nodejs.org/api/crypto.html). +![version badge](https://badgen.net/npm/v/occulto) +![downloads badge](https://badgen.net/npm/dt/occulto) +![dependency count](https://badgen.net/bundlephobia/dependency-count/occulto) +![minzip size badge](https://badgen.net/bundlephobia/minzip/occulto) +![types badge](https://badgen.net/npm/types/occulto) -**No Deps & Typescript typings included** +Isomorphic encryption library that works both in the browser and node with _no dependencies_ and written in Typescript. -Supports Hashes, Symmetric AES & ChaCha20 ciphers and Asymmetric RSA. - -[**📒 DOCS HERE 📒**](https://cupcakearmy.github.io/occulto/index.html) +[**📒 API Documentation 📒**](https://occulto.pages.dev) ## Quickstart 🚀 @@ -24,32 +26,32 @@ Supports Hashes, Symmetric AES & ChaCha20 ciphers and Asymmetric RSA. npm i occulto ``` -### Examples +## Examples -## [RSA](https://cupcakearmy.github.io/occulto/modules/_rsa_.html) +### [RSA](https://occulto.pages.dev/classes/RSA) ```typescript import { RSA } from 'occulto' -const pair = await RSA.gen() -const encrypted = RSA.encrypt('some text', pair.pub) -const decrypted = RSA.decrypt(encrypted, pair.prv) +const pair = await RSA.generateKeyPair() +const encrypted = await RSA.encrypt('some text', pair.public) +const decrypted = await RSA.decrypt(encrypted, pair.private) ``` -## [Symmetric](https://cupcakearmy.github.io/occulto/modules/_symmetric_.html) +### [AES](https://occulto.pages.dev/classes/AES) -[Available Ciphers](https://cupcakearmy.github.io/occulto/enums/_symmetric_.ciphers.html) +[Available Modes](https://occulto.pages.dev/enums/Modes) ```javascript import { Symmetric } from 'occulto' -const encrypted = Symmetric.encrypt('some string', 'myPass', Symmetric.Ciphers.AES_128_GCM) -const decrypted = Symmetric.decrypt(encrypted, 'myPadd') +const encrypted = await Symmetric.encryptEasy('some string', 'myPass') +const decrypted = await Symmetric.decryptEasy(encrypted, 'myPass') ``` -## [Hash](https://cupcakearmy.github.io/occulto/modules/_hash_.html) +### [Hash](https://occulto.pages.dev/classes/Hash) -[Available hashes](https://cupcakearmy.github.io/occulto/enums/_hash_.hashes.html) +[Available hashes](https://occulto.pages.dev/enums/Hashes) ```typescript import { Hash } from 'occulto'