@fruitsjs/crypto
Version:
Cryptographic functions for building Fruits Eco-Blockchain apps.
33 lines (21 loc) • 633 B
Markdown
Cryptographic functions for building Fruits Eco-Blockchain apps.
FruitsJS can be used with NodeJS or Web.
Install using [npm](https://www.npmjs.org/):
```
npm install @fruitsjs/crypto
```
or using [yarn](https://yarnpkg.com/):
``` yarn
yarn add @fruitsjs/crypto
```
```js
import {encryptAES, decryptAES, hashSHA256} from '@fruitsjs/crypto'
const encrypted = encryptAES('test', 'key')
const decrypted = decryptAES(encrypted, 'key')
console.log(hashSHA256('test'))
console.log(decrypted)
```