ja-encryptor
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

⚒️ ja-encryptor

Jast another aes256 encryptor/decryptor

license commonjs module typescript version npm version npm downloads

Install

npm install --save ja-encryptor

or

yarn install ja-encryptor

Import module

const Encryptor = require('ja-encryptor');

or

import Encryptor from 'ja-encryptor';

Usage

const encryptor = new Encryptor({ key: "1234567890ABCDEF" });
const encryptedString = encryptor.encrypt("test");
console.log(encryptor.decrypt(encryptedString));
// currently only string allowed, so you can just stringify object
const encryptedObject = encryptor.encrypt(JSON.stringify({ key: "value" }));
console.log(JSON.parse(encryptor.decrypt(encryptedObject)));

Build

npm run build // for single build

npm run watch // to watch changes

or

yarn build // for single build

yarn watch // to watch changes

Author

Sergey Frangulov

License

ISC License

Copyright (c) 2020 Sergey Frangulov

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Package Sidebar

Install

npm i ja-encryptor

Weekly Downloads

0

Version

0.0.3

License

ISC

Unpacked Size

8.17 kB

Total Files

7

Last publish

Collaborators

  • sfrangulov