
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Novel implementation of multiple ciphers to harden security.
Novel implementation of multiple ciphers to harden security.
npm install cubecipher
var decrypt, encrypt, key, pt0, pt1, ref;
ref = require('cubecipher'), encrypt = ref.encrypt, decrypt = ref.decrypt;
key = new Buffer('SecretPassword');
pt0 = new Buffer('SecretInformation');
pt1 = new Buffer(pt0);
encrypt({
key: key,
data: pt1
}, function(err, ciphertext) {
console.log('Encrypted Data',ciphertext);
return decrypt({
key: key,
data: ciphertext
}, function(err, pt2) {
return console.log("Decrypted Data", pt2);
});
});
If you plan to be encrypting more than once, you can choose to reuse the derived keys:
var Decryptor, Encryptor, dec, enc, key, pt0, pt1, pt2, ref;
ref = require('cubecipher');
Encryptor = ref.Encryptor;
Decryptor = ref.Decryptor;
key = new Buffer('SecretPassword');
enc = new Encryptor({
key: key
});
dec = new Decryptor({
key: key
});
pt0 = new Buffer('SecretInformation');
pt1 = new Buffer(pt0);
pt2 = new Buffer(pt0);
enc.run({
data: pt1
}, function(err, ct1) {
return enc.run({
data: pt2
}, function(err, ct2) {
return dec.run({
data: ct1
}, function(err, pt3) {
return dec.run({
data: ct2
}, function(err, pt4) {
return console.log('Decrypted Data', pt3, 'and', pt4);
});
});
});
});
If you want to resalt derived keys with every encryption, you have an option to ask for that. Otherwise, salt will be reused to speed up encryption (and decryption).
enc.run({
data: pt1
}, function(err, ct1) {
return enc.resalt({}, function() {
return enc.run({
data: pt2
}, function(err, ct2) {});
});
});
FAQs
Novel implementation of multiple ciphers to harden security.
The npm package cubecipher receives a total of 0 weekly downloads. As such, cubecipher popularity was classified as not popular.
We found that cubecipher 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
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.