Jast another aes256 encryptor/decryptor
npm install ja-encryptor
npm install --save ja-encryptor
`or
`
yarn install ja-encryptor
`
Import module
`js
const Encryptor = require('ja-encryptor');
`
or
`js
import Encryptor from 'ja-encryptor';
`
Usage
`js
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 buildnpm run watch // to watch changes
`or
`
yarn build // for single buildyarn watch // to watch changes
``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.