dbos-bcrypt 2.1.7-preview
Install from the command line:
Learn more about npm packages
$ npm install @dbos-inc/dbos-bcrypt@2.1.7-preview
Install via package.json:
"@dbos-inc/dbos-bcrypt": "2.1.7-preview"
About this version
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.
bcryptGenSalt
produces a random salt. Optional parameter is the number of rounds.
bcryptHash
generates a random salt and uses it to create a hash of txt
.
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);
- To start a DBOS app from a template, visit our quickstart.
- For DBOS Transact programming tutorials, check out our programming guide.
- To learn more about DBOS, take a look at our documentation or our source code.
Details
- dbos-bcrypt
- dbos-inc
- 18 days ago
- MIT
- 4 dependencies
Assets
- dbos-bcrypt-2.1.7-preview.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0