ldap-passwd

0.1.3 • Public • Published

ldap-passwd

Simple password util for ldap userPassword, inspired by https://github.com/peppelinux/pySSHA-slapd

What is it

This is a simple lib and cli tool for generating or verifying the ldap userPassword.

It supports salted:

  • md5
  • sha1
  • sha224
  • sha256
  • sha384
  • sha512

How to use it

CLI usage

  1. npm i -g ldap-passwd or yarn global add ldap-passwd
  2. ldap-passwd

LIB usage

First install this package via npm i ldap-passwd or yarn add ldap-passwd, then import it in your app.

const { checkPassword, hashPassword } = require('ldap-passwd');
// ......
const is_valid = checkPassword(plain_password, hashed_check_password);
const generated_hashed_password = hashPassword('SHA1', plain_password);

Snapshot

asciicast

License

MIT License

Copyright (c) 2020 liudonghua

Readme

Keywords

Package Sidebar

Install

npm i ldap-passwd

Weekly Downloads

56

Version

0.1.3

License

MIT

Unpacked Size

9.03 kB

Total Files

5

Last publish

Collaborators

  • liudonghua123