
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
passmanager-delux
Advanced tools
A simple library for managing and generating passwords in Node.js
A simple password manager that allows you to generate, save, retrieve, and delete passwords.
git clone https://github.com/your-username/passmanager.git
cd passmanager
npm install
To use the PassManager class, you can require it in your JavaScript code:
const PassManager = require('./passmanager');
To generate a password of a given length, you can use the generatePassword
method:
const pm = new PassManager();
const password = pm.generatePassword(10);
console.log(password);
To save a password with a given name, you can use the savePassword
method:
const pm = new PassManager();
await pm.savePassword('example', 'password123');
To retrieve all saved passwords, you can use the getPasswords
method:
const pm = new PassManager();
const passwords = pm.getPasswords();
console.log(passwords);
To retrieve a specific password by name, you can use the getPassword
method:
const pm = new PassManager();
const password = pm.getPassword('example');
console.log(password);
To delete a password with a given name, you can use the deletePassword
method:
const pm = new PassManager();
await pm.deletePassword('example');
To compare a plain text password with the hashed password for a given name, you can use the comparePassword
method:
const pm = new PassManager();
const isMatch = await pm.comparePassword('example', 'password123');
console.log(isMatch);
The PassManager class uses the bcrypt library to hash passwords before saving them. This ensures that the passwords are stored securely.
However, the getPassword
method allows you to retrieve the original, unhashed password. This is not recommended as it poses a security risk. It's generally better to use a secure method to store and retrieve passwords, such as hashing them and comparing the hashed password with the hashed input when authenticating a user.
This project is licensed under the MIT License. See the LICENSE file for details.
FAQs
A simple library for managing and generating passwords in Node.js
The npm package passmanager-delux receives a total of 0 weekly downloads. As such, passmanager-delux popularity was classified as not popular.
We found that passmanager-delux demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.