1.0.1 • Published 4 years ago

mbu-crypto v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

GitHub issues GitHub forks GitHub stars GitHub license

Encryption module of Mercantil API for Node.js

Features

Installation

$ yarn add mbu-crypto

Usage

import MBUCrypto from 'mbu-crypto';

const encryptionKey = process.env.MBU_ENCRYPTION_KEY as string;
const instance = new MBUCrypto(encryptionKey);
const textToEncrypt = '1234';

const encrypted = instance.encrypt(textToEncrypt);
console.log(encrypted); // 'F5zai+S5sgmbdNPDEVRlVg=='

const decrypted = instance.decrypt(encrypted);
console.log(decrypted); // '1234'

Related

  • mbu-api - Container to interact with the Mercantil API for Node.js

Author

npm.io
Miguel Padrino

License

MIT © Miguel Padrino

1.0.1

4 years ago

1.0.0

4 years ago