JS crypt and decrypt with crypto-js
npm install g-cryptJS crypt and decrypt with crypto-js
======

crypt-js wrapper
npm g-crypt
`install bower package
`
bower install g-crypt
`Example
Encrypt and decrypt socket.io comunications
The socket.io server
`js
var io = require('socket.io')(3000),
Crypt = require("g-crypt"),
passphrase = 'fcf8afd67e96fa3366dd8eafec8bcace',
crypter = Crypt(passphrase);io.on('connection', function (socket) {
socket.on('counter', function (data) {
var decriptedData = crypter.decrypt(data);
setTimeout(function () {
console.log("counter status: " + decriptedData.id);
decriptedData.id++;
socket.emit('counter', crypter.encrypt(decriptedData));
}, 1000);
});
});
`the HTTP client
`html
Title
Open console to see the messages
``