Encrypt and decrypt data with AES-256-CTR
npm install jovi> Encrypt and decrypt data with AES-256-CTR
```
$ npm install --save jovi
`js
const crypto = require('crypto');
const jovi = require('jovi');
const key = crypto.randomBytes(32);
const result = jovi.encrypt('unicorns', key)
/*
{
iv:
hash:
}
*/
jovi.decrypt(result.hash, key, result.iv);
//=> 'unicorns'
`
#### data
Type: buffer, string
Buffer you want to encrypt.
While strings are supported you should prefer buffers as they're faster to hash. Though if you already have a string you should not convert it to a buffer.
#### key
Type: buffer
Key to encrypt the data with.
#### data
Type: buffer
Buffer you want to decrypt.
#### key
Type: buffer
Key that was used to encrypt the data.
#### iv
Type: buffer`
IV that was used to encrypt the data.
MIT © Sam Verschueren