Update README.md

This commit is contained in:
Nicco 2019-07-07 21:48:49 +02:00 committed by GitHub
parent 7f2309af02
commit 0467a81797
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,8 @@ npm i node-forge occulto
## [RSA](https://cupcakearmy.github.io/occulto/modules/_rsa_.html)
```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)