Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
pkcs7
Advanced tools
Readme
Add and remove pkcs7-style padding.
Table of Contents generated with DocToc
Install the module with: npm install pkcs7
var pkcs7 = require('pkcs7'), encrypted;
// pad a buffer!
enctcrypted = encrypt(pkcs7.pad(buffer));
// later, you can unpad it:
console.log('the secret is out! ' + pkcs7.unpad(decrypt(encrypted)));
Install with cli command
$ npm install -g pkcs7
$ pkcs7 --help
$ pkcs7 --version
PKCS#7 padding a really simple transformation some crytographic algorithms use to ensure the number of input bytes is a multiple of some constant. Here's how it works:
01 -- if lth mod k = k-1
02 02 -- if lth mod k = k-2
.
.
.
k k ... k k -- if lth mod k = 0
k
is the constant value the encryption algorithm wants your input to be a multiple of. This project assumes k
is always sixteen. Not much to it, right? If reading specs is your thing, check out RFC 5652.
You can run pkcs7 from the command line:
# pad a string generated by echo and the hex dump the result
echo -n "0123456789AB" | pkcs7 | xxd
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Copyright (c) 2014 Brightcove Licensed under the Apache-2 license.
FAQs
Add and remove pkcs7-style padding.
The npm package pkcs7 receives a total of 343,557 weekly downloads. As such, pkcs7 popularity was classified as popular.
We found that pkcs7 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 142 open source maintainers 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.