1.0.1 • Published 4 years ago
mbu-crypto v1.0.1
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
Miguel Padrino |