
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
bcrypt-edge
Advanced tools
[!CAUTION] This library is no longer maintained, please consider switching to bcrypt-ts, which is better in every way.
ESM Edge/worker conversion for bcrypt.js.
This is a re-implementation of Bcrypt specifically for web workers, in particular Cloudflare. The following differences can be observed from the source library:
async methods have been removed. These don't work in a Web Worker environment, so they were removed.
process.nextTickasync isn't as impactfulcrypto compatibility layer via MiniflareCare was taken to disturb as little as possible with the initial implementation.
Usage is similar to the original library, except it's an ESM worker module now and has no async methods.
import {
genSaltSync,
hashSync,
compareSync,
getRounds,
getSaltSync,
} from 'bcrypt-edge';
// Hashing
const salt = bcrypt.genSaltSync(10);
const hash = bcrypt.hashSync('B4c0//', salt);
// Create Salt+Hash in one line
const hash = bcrypt.hashSync('bacon', 8);
// Comparing
bcrypt.compareSync('B4c0//', hash); // true
bcrypt.compareSync('not_bacon', hash); // false
Running bcrypt-edge in Miniflare against the original bcrypt package, the benchmarks are as follows. It is very likely that platform specific inhancements could be made to improve performace of bcrypt-edge.
| Library | Rounds | Hash Time |
|---|---|---|
| bcryptjs | 8 | 20ms |
| bcrypt-edge | 8 | 35ms |
| bcryptjs | 9 | 40ms |
| bcrypt-edge | 9 | 72ms |
| bcryptjs | 10 | 81ms |
| bcrypt-edge | 10 | 143ms |
| bcryptjs | 11 | 161ms |
| bcrypt-edge | 11 | 278ms |
| bcryptjs | 12 | 326ms |
| bcrypt-edge | 12 | 564ms |
| bcryptjs | 13 | 653ms |
| bcrypt-edge | 13 | 1138ms |
| bcryptjs | 14 | 1316ms |
| bcrypt-edge | 14 | 2266ms |
| bcryptjs | 15 | 2646ms |
| bcrypt-edge | 15 | 4498ms |
FAQs
Bcrypt implementation specifically for web workers
The npm package bcrypt-edge receives a total of 1,946 weekly downloads. As such, bcrypt-edge popularity was classified as popular.
We found that bcrypt-edge demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.