kevast-encrypt
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

kevast-file.js

Build Status Coverage Status Dependencies Dev Dependencies Package Version Open Issues MIT License

Encryption middleware for kevast.js.

Kevast-gist encrypts data with AES-128-CBC.

For encryption detail, refer to node-forge.

Installation

Node.js

Using yarn

yarn add kevast-encrypt

Using npm

npm install kevast-encrypt

Browser

<script src="https://cdn.jsdelivr.net/npm/kevast-encrypt/dist/kevast-encrypt.min.js"></script>

Usage

const { Kevast } = require('kevast');
const { KevastMemory } = require('kevast-memory');
const { KevastEncrypt } = require('kevast-encrypt');
const assert = require('assert');

(async () => {
  const map = new Map();
  const kevast = new Kevast(new KevastMemory(map));
  kevast.use(new KevastEncrypt(KevastEncrypt.randomString()));
  await kevast.set('key', 'value');
  console.log(map);
  assert(await kevast.get('key') === 'value');
})();

Package Sidebar

Install

npm i kevast-encrypt

Weekly Downloads

2

Version

0.1.1

License

MIT

Unpacked Size

2.1 MB

Total Files

10

Last publish

Collaborators

  • andie