# @types/phc__bcrypt

> TypeScript definitions for @phc/bcrypt

Latest version **1.0.2** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/phc__bcrypt
pnpm add @types/phc__bcrypt
yarn add @types/phc__bcrypt
bun add @types/phc__bcrypt
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-11-07 |
| First published | 2021-07-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51394 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/phc__bcrypt
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/phc__bcrypt
- npm.io page: https://npm.io/package/@types/phc__bcrypt

## Recent versions

- 1.0.2 (latest) — 2023-11-07
- 1.0.0 (ts3.6) — 2021-07-28
- 1.0.1 — 2023-10-18

## README

# Installation
> `npm install --save @types/phc__bcrypt`

# Summary
This package contains type definitions for @phc/bcrypt (https://github.com/simonepri/phc-bcrypt).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/phc__bcrypt.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/phc__bcrypt/index.d.ts)
````ts
export interface Options {
    rounds?: number;
    saltSize?: number;
}

/**
 * Computes the hash string of the given password in the PHC format using bcrypt
 * package.
 * @param password The password to hash.
 * @param [options] Optional configurations related to the hashing
 * function.
 * @param [options.rounds=10] Optional
 * Must be an integer within the range (`4` <= `rounds` <= `31`).
 * @return The generated secure hash string in the PHC
 * format.
 */
export function hash(password: string, options?: Options): Promise<string>;

/**
 * Determines whether or not the hash stored inside the PHC formatted string
 * matches the hash generated for the password provided.
 * @param phcstr Secure hash string generated from this package.
 * @param password User's password input.
 * @returns A boolean that is true if the hash computed
 * for the password matches.
 */
export function verify(hash: string, plainPassword: string): Promise<boolean>;

/**
 * Gets the list of all identifiers supported by this hashing function.
 * @returns A list of identifiers supported by this hashing function.
 */
export function identifiers(): string[];

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Toan Nguyen](https://github.com/vespaiach).

---
_Source: https://npm.io/package/@types/phc__bcrypt · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
