
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.