New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dbos-inc/dbos-bcrypt

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dbos-inc/dbos-bcrypt

DBOS bcrypt step library

  • 2.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

DBOS bcrypt Steps

This is a DBOS step for generating bcrypt hashes.

The reason that some bcrypt operations should be wrapped in a @DBOS.step is that they generate random numbers. By using a step, replayed or restarted workflows will get the recorded value and therefore have the same behavior as the original.

Available Functions

bcryptGenSalt(saltRounds?:number)

bcryptGenSalt produces a random salt. Optional parameter is the number of rounds.

bcryptHash(txt: string, saltRounds?:number)

bcryptHash generates a random salt and uses it to create a hash of txt.

Examples

It is suggested to use the BcryptStepV2 from this library. The functionality is the same, but invocation syntax is simpler.

import { BcryptStep } from '@dbos-inc/dbos-bcrypt';
//...
const hashedPassword = await BcryptStep.bcryptHash(password);
//...
const isValid = await BcryptStep.bcryptCompare(password, hashedPassword);

Next Steps

FAQs

Package last updated on 16 Jan 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc