Socket
Socket
Sign inDemoInstall

ldap-sha

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ldap-sha

Ldap ssha password generator for node


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 20 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc