From ecb3aec2253aa0fb19a83f7b262e9f059c23f564 Mon Sep 17 00:00:00 2001 From: Nicco Date: Sun, 7 Jul 2019 21:44:18 +0200 Subject: [PATCH] Update README.md --- README.md | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 71d655d..38129de 100644 --- a/README.md +++ b/README.md @@ -14,25 +14,13 @@ Supports Hashes, Symmetric AES & ChaCha20 ciphers and Asymmetric RSA. npm i node-forge occulto ``` -```javascript -// Whatever import you prefer -// const { RSA } = require('occulto') -import { RSA } from 'occulto' - -const pair = await RSA.gen() - -const encrypted = RSA.encrypt('some string', 'myPass') -const decrypted = RSA.decrypt(encrypted, 'myPass') - -``` - [**📒 DOCS HERE 📒**](https://cupcakearmy.github.io/occulto/index.html) ### Examples ## RSA -```javascript +```typescript const pair = await RSA.gen() const encrypted = RSA.encrypt('some text', pair.pub) const decrypted = RSA.decrypt(encrypted, pair.prv) @@ -41,8 +29,6 @@ const decrypted = RSA.decrypt(encrypted, pair.prv) ## Symmetric ```javascript -// Whatever import you prefer -// const { Symmetric } = require('occulto') import { Symmetric } from 'occulto' const encrypted = Symmetric.encrypt('some string' , 'myPass', Symmetric.Ciphers.AES_128_GCM) @@ -51,13 +37,11 @@ const decrypted = Symmetric.decrypt(encrypted, 'myPadd') ## Hash -```javascript -// Whatever import you prefer -// const { Hash } = require('occulto') +```typescript import { Hash } from 'occulto' const hash = Hash.digest('something') -const h = Hash.digest('something', Hashes.MD5) +const h = Hash.digest('something', Hash.Hashes.MD5) ```