Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
A pure JavaScript and zero dependencies cyclic redundancy check (CRC) node module.
It supports crc8, crc16 and crc32.
npm install --save easy-crc
There are three functions available respectively named crc8()
, crc16()
and crc32()
. These functions take three arguments.
The first argument is a string with the name of the desired algorithm (below the list), and the second is the data on which you want to calculate crc. Data can be a string or a buffer.
The third parameter is the CRC seed and is optional.
const { crc8, crc16, crc32 } = require('easy-crc');
// CRC8
let data = '12345';
let checksum = crc8('CRC-8', data);
console.log(checksum.toString(16));// "cb"
// CRC16
data = Buffer.from([0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39]);
checksum = crc16('CCITT-FALSE', data);
console.log(checksum.toString(16));// "7d61"
// CRC32
data = 'Hello!';
checksum = crc32('CRC-32', data);
console.log(checksum.toString(16));// "9d2acc56"
The follow algorithm names can be passed as first argument of respective crc8()
, crc16()
and crc32()
methods.
npm test
FAQs
A pure JavaScript and zero dependencies CRC node module.
The npm package easy-crc receives a total of 1,617 weekly downloads. As such, easy-crc popularity was classified as popular.
We found that easy-crc 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 found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.