Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
HotPacket provides tools for javascript object encryption and encoding.
You are probably looking for this: https://github.com/cisco/node-jose
This project is abandoned.
HotPacket provides tools for javascript object encryption and encoding.
$ npm install hotpacket --save
var HotPacket = require('HotPacket');
or
<!-- dev -->
<script src="https://cdn.rawgit.com/OR13/hotpacket/master/dist/hotpacket.js"></script>
<!-- prod (but really did you read the warning?) -->
<script src="https://rawgit.com/OR13/hotpacket/master/dist/hotpacket.js"></script
HotPacket.init({ password: 'shared_secret' });
var newEnvelope = HotPacket.new({
type: "update_name",
data: { id: 0, name: "billy" }
});
console.log('newEnvelope: ', newEnvelope)
var encryptedEnvelope = HotPacket.encrypt(newEnvelope);
console.log('encryptedEnvelope: ', encryptedEnvelope)
var decryptedEnvelope = HotPacket.decrypt(encryptedEnvelope);
console.log('decryptedEnvelope: ', decryptedEnvelope)
console.log("HotPacket.isEqual(newEnvelope, decryptedEnvelope): ", HotPacket.isEqual(newEnvelope, decryptedEnvelope) );
console.log("are objects equal: ", newEnvelope === decryptedEnvelope);
console.log("are object strings equal: ", JSON.stringify(newEnvelope) === JSON.stringify(decryptedEnvelope));
var myObject = {
foo: "bar"
};
var env = HotPacket.new(myObject);
var b64Env = HotPacket.encodeBase64(env);
var expected = 'eyJ0eXBlIjoiSG90UGFja2V0RW52ZWxvcGUiLCJlbmNyeXB0ZWQiOmZhbHNlLCJib2R5Ijp7ImZvbyI6ImJhciJ9fQ==';
console.log('expect true: ', b64Env === expected);
var encoded = 'eyJ0eXBlIjoiSG90UGFja2V0RW52ZWxvcGUiLCJlbmNyeXB0ZWQiOmZhbHNlLCJib2R5Ijp7ImZvbyI6ImJhciJ9fQ==';
var expected = {
foo: "bar"
};
var decoded = HotPacket.decodeBase64(encoded);
console.log('expect true: ', JSON.stringify(expected) === JSON.stringify(decoded.body));
$ npm run test
$ npm run build
FAQs
HotPacket provides tools for javascript object encryption and encoding.
We found that hotpacket 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.