
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
apache-crypt
Advanced tools
The apache-crypt npm package provides functions to create and verify passwords using the Apache htpasswd crypt algorithm. It is useful for managing user authentication in web applications that use Apache's htpasswd files.
Encrypt Password
This feature allows you to encrypt a plain text password using the Apache htpasswd crypt algorithm. The encrypted password can then be stored securely.
const apacheCrypt = require('apache-crypt');
const encryptedPassword = apacheCrypt('myPassword');
console.log(encryptedPassword);
Verify Password
This feature allows you to verify a plain text password against an encrypted password. It is useful for authentication purposes.
const apacheCrypt = require('apache-crypt');
const encryptedPassword = apacheCrypt('myPassword');
const isMatch = apacheCrypt('myPassword', encryptedPassword) === encryptedPassword;
console.log(isMatch);
bcrypt is a popular library for hashing and verifying passwords. It uses the bcrypt algorithm, which is more secure and computationally intensive than the Apache htpasswd crypt algorithm. bcrypt is widely used in modern web applications for password management.
argon2 is a highly secure password hashing algorithm and the winner of the Password Hashing Competition. The argon2 npm package provides functions to hash and verify passwords using the Argon2 algorithm. It is considered more secure than both bcrypt and the Apache htpasswd crypt algorithm.
pbkdf2 is a key derivation function that is part of the PKCS #5 standard. The pbkdf2 npm package provides functions to hash and verify passwords using the PBKDF2 algorithm. It is less commonly used than bcrypt and argon2 but still provides a high level of security.
Node.js package for Apache style password encryption using crypt(3).
Via git (or downloaded tarball):
$ git clone git://github.com/gevorg/apache-crypt.git
Via npm:
$ npm install apache-crypt
const crypt = require("apache-crypt");
// Encrypting password using auto-generated 2 char salt.
const encryptedPassword = crypt("mypass");
// Should print true.
console.log(crypt("mypass", encryptedPassword) == encryptedPassword);
// Should print false.
console.log(crypt("notmypass", encryptedPassword) == encryptedPassword);
It uses mocha, so just run following command in package directory:
$ npm test
The MIT License (MIT)
FAQs
Node.js module for Apache style password encryption using crypt(3).
The npm package apache-crypt receives a total of 399,664 weekly downloads. As such, apache-crypt popularity was classified as popular.
We found that apache-crypt 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.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.