Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
browser-passworder
Advanced tools
A simple browserifiable module for password-encrypting JS objects.
A simple module for encrypting & decrypting Javascript objects with a password in the browser.
Serializes the encrypted payload as a string of text for easy storage.
Uses browser native crypto to be the lightest possible module you can have, with the most vetted internals you could ask for (the real guts here are implemented by the browser provider).
You need to have node.js installed.
npm install browser-passworder
var passworder = require('browser-passworder')
var secrets = { coolStuff: 'all', ssn: 'livin large' }
var password = 'hunter55'
passworder.encrypt(password, secrets)
.then(function(blob) {
return passworder.decrypt(password, blob)
})
.then(function(result) {
assert.deepEqual(result, secrets)
})
There are also some more advanced internal methods you can choose to use, but that's the basic version of it.
The most advanced alternate usage would be if you want to cache the password-derived key to speed up performance for many encryptions/decryptions with the same password.
The serialized text is stored as a JSON blob that includes two base64-encoded fields, data
and iv
, neither of which you need to worry about.
The data is encrypted using the AES-GCM
algorithm. It is salted with the result of crypto.getRandomValues()
, and the encryption vector is generated the same way.
npm test
FAQs
A simple browserifiable module for password-encrypting JS objects.
The npm package browser-passworder receives a total of 493 weekly downloads. As such, browser-passworder popularity was classified as not popular.
We found that browser-passworder 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.