# aspnet-identityv3

> Typescript library for checking ASP.NET Identity V2 & V3 password

Latest version **1.0.1** (published 2018-06-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install aspnet-identityv3
pnpm add aspnet-identityv3
yarn add aspnet-identityv3
bun add aspnet-identityv3
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-06-26 |
| First published | 2018-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 115.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Pavel Borisov |
| Maintainers | quercusb |
| Keywords | ASP.NET, Identity, Password |

## Links

- npm: https://www.npmjs.com/package/aspnet-identityv3
- Repository: https://github.com/QuercusB/aspnet-identityv3
- Homepage: https://github.com/QuercusB/aspnet-identityv3#readme
- Issues: https://github.com/QuercusB/aspnet-identityv3/issues
- npm.io page: https://npm.io/package/aspnet-identityv3

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-06-26
- 1.0.0 — 2018-06-26

## README

# aspnet-identityv3

[![Build Status](https://travis-ci.org/QuercusB/aspnet-identityv3.svg?branch=master)](https://travis-ci.org/QuercusB/aspnet-identityv3)
[![Coverage Status](https://coveralls.io/repos/github/QuercusB/aspnet-identityv3/badge.svg?branch=master)](https://coveralls.io/github/QuercusB/aspnet-identityv3?branch=master)

## Description

Typescript library to generate & validate ASP.NET Identity V2 & V3 passwords.
To be used for connecting node.js application to ASP.NET managed database in case you need to separate authorization out of ASP.NET application.

## Install

This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): 

```sh
$ npm install aspnet-identityv3 --save
```

## Typescript

### Generate hash for the password

```typescript
import aspnet_hasher from 'aspnet-identityv3';

const hash = await aspnet_hasher.hash('Some password'); // hash: Buffer

const hashStr = await aspnet_hasher.hash64('Some password'); // hash: Base64 encoded string
```

### Verify password over hashed

```typescript
import aspnet_hasher from 'aspnet-identityv3';

await aspnet_hasher.verify('Swordfish', new Buffer('005421a7c5dfa8927f2bacbd8dee42dffd1c19942452d218fe1661a60f5ee71469afa776658519422352186d14f1dca997', 'hex'))

// you can either pass Buffer or base64 encoded string

await aspnet_hasher.verify('Swordfish', 'AQAAAAEAACcQAAAAEFQhp8XfqJJ/K6y9je5C3/3q8wIiGrIPBj9JjkBzEafFl7nBaGcmzfHVDGDs04m/ew==')
```

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