msisdn-encrypt
v1.0.4
Published
Downloads
3
Readme
MSISDN ENCRYPTION MODULE
A Node library for encrypting and decrypting msisdns.
Installation
npm install msisdn-encrypt --save
Adding to your project
var encryptlib = require('msisdn-encrypt');
Initializing
You can initialize with the default algorithm and key you have saved in your .env file or you can pass in an algorithm and key on the fly
- With default key and algorithm
var encryption = new encryptlib();
- With secret key and algorithm passed
var encryption = new encryptlib({algorithm: 'aes192', key: 'a password'});
Usage
- Encryption
var encrypted_data = encryption.encrypt({data:"+2349067338954", format: "string"});
console.log(encrypted_data);
- Decryption
var decrypted_data = encryption1.decrypt({data:"ba3abe97179e07a26831c372c9fd0208", format: "string"});
console.log(decrypted_data);
License
© [ Terragon Tech ] (mailto:[email protected])