Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
crypt-js wrapper
npm g-crypt
bower install g-crypt
Encrypt and decrypt socket.io comunications
The socket.io server
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
Open console to see the messages
<script src="http://localhost:3000/socket.io/socket.io.js"></script>
<script src="assets/cryptojslib/rollups/aes.js"></script>
<script src="assets/g-crypt/src/Crypt.js"></script>
<script>
var socket = io('http://localhost:3000/'),
passphrase = 'fcf8afd67e96fa3366dd8eafec8bcace',
crypter = Crypt(passphrase),
id = 0;
socket.on('connect', function () {
console.log("connected! Let's start the counter with: " + id);
socket.emit('counter', crypter.encrypt({id: id}));
});
socket.on('counter', function (data) {
var decriptedData = crypter.decrypt(data);
console.log("counter status: " + decriptedData.id);
socket.emit('counter', crypter.encrypt({id: decriptedData.id}));
});
</script>
</body>
</html>
FAQs
JS crypt and decrypt with crypto-js
The npm package g-crypt receives a total of 13 weekly downloads. As such, g-crypt popularity was classified as not popular.
We found that g-crypt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.