JSPM

ja-encryptor

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q51740F
  • License ISC

Jast another aes256 encryptor/decryptor

Package Exports

  • ja-encryptor

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ja-encryptor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

⚒️ 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.