This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

ldap-sha
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Ldap-sha

Ldap SSHA password generator for node

npm License Gitmoji rosa.dev.br

✨ Features

  • Encrypt a plain text password with the Ldap SSHA algorithm.
  • Verify passwords encrypted with SSHA.
  • No external dependencies.

🚀 Setup

  1. Install with your favorite package manager:

    • pnpm : pnpm i ldap-sha
    • npm : npm i ldap-sha
    • yarn : yarn add ldap-sha
    • bun : bun add ldap-sha
  2. Import the function into your project:

import { ssha, verifySSHA } from 'ldap-sha'

⚡️ Usage

  1. Encrypt a plain text password using SSHA:
const encryptedPassword = ssha('mySuperSecretPassword')
// return {SSHA}sTIysPunEI4boe6OwgQO+/tRZao2OWJIbDMvY0g2UlM=
  1. Validate your plain text password with a SSHA encrypted password:
    The SSHA password can be either a single string or an array of strings. The plain text password will be compared to each SSHA password and the function will return true if any of them matches
const isValid = verifySSHA('mySuperSecretPassword', arrayOfSSHAPasswords)
// return true or false

📝 License

Copyright © 2024 Gabriel 'DethDKN' Rosa
This project is under MIT license

Package Sidebar

Install

npm i ldap-sha

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

7.47 kB

Total Files

8

Last publish

Collaborators

  • dethdkn