# apache-crypt

> Node.js module for Apache style password encryption using crypt(3).

Latest version **1.2.6** (published 2022-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install apache-crypt
pnpm add apache-crypt
yarn add apache-crypt
bun add apache-crypt
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.6 |
| Published | 2022-09-21 |
| First published | 2013-12-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 1 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Gevorg Harutyunyan |
| Maintainers | gevorg |
| Keywords | apache, crypt, password, htpasswd |

## Links

- npm: https://www.npmjs.com/package/apache-crypt
- Repository: https://github.com/gevorg/apache-crypt
- Homepage: http://github.com/gevorg/apache-crypt
- Issues: http://github.com/gevorg/apache-crypt/issues
- npm.io page: https://npm.io/package/apache-crypt

## Dependencies (1)

- [unix-crypt-td-js](https://npm.io/package/unix-crypt-td-js.md) ^1.1.4

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 1.2.6 (latest) — 2022-09-21
- 1.2.5 — 2021-06-24
- 1.2.4 — 2020-02-03
- 1.2.3 — 2020-02-02
- 1.2.2 — 2020-02-02
- 1.2.1 — 2016-10-24
- 1.2.0 — 2016-10-18
- 1.1.2 — 2016-06-10
- 1.1.1 — 2016-05-13
- 1.1.0 — 2016-04-01
- 1.0.9 — 2015-10-25
- 1.0.8 — 2014-11-28
- 1.0.7 — 2014-11-28
- 1.0.6 — 2014-06-06
- 1.0.5 — 2014-04-08
- … 5 more at https://npm.io/package/apache-crypt/versions

## README

# apache-crypt
[Node.js](http://nodejs.org/) package for Apache style password encryption using crypt(3).

[![build](https://github.com/gevorg/apache-crypt/workflows/build/badge.svg)](https://github.com/gevorg/apache-crypt/actions/workflows/build.yml)

## Installation

Via git (or downloaded tarball):

```bash
$ git clone git://github.com/gevorg/apache-crypt.git
```
Via [npm](http://npmjs.org/):

```bash
$ npm install apache-crypt
```

## Usage

```javascript
const crypt = require("apache-crypt");

// Encrypting password using auto-generated 2 char salt.
const encryptedPassword = crypt("mypass");

// Should print true.
console.log(crypt("mypass", encryptedPassword) == encryptedPassword);
// Should print false.
console.log(crypt("notmypass", encryptedPassword) == encryptedPassword);
```

## Running tests

It uses [mocha](https://mochajs.org/), so just run following command in package directory:

```bash
$ npm test
```

## License

The MIT License (MIT)

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