1.0.2 • Published 4 months ago

ldap-md5 v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

✨ Features

  • Encrypt a plain text password with the Ldap MD5 algorithm.
  • Verify passwords encrypted with MD5.
  • No external dependencies.
  • Keep in mind that MD5 is not considered a secure hashing algorithm for storing passwords, as it is vulnerable to various attacks.

🚀 Setup

  1. Install with your favorite package manager:

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

import { md5, verifyMD5 } from 'ldap-md5'

⚡️ Usage

  1. Encrypt a plain text password using md5:
const encryptedPassword = md5('mySuperSecretPassword')
// return {MD5}aTVgaG9NWR2N1eNABkQgYQ==
  1. Validate your plain text password with a MD5 encrypted password:\ The MD5 password can be either a single string or an array of strings. The plain text password will be compared to each MD5 password and the function will return true if any of them matches
const isValid = verifyMD5('mySuperSecretPassword', arrayOfMD5Passwords)
// return true or false

📝 License

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

1.0.2

4 months ago

1.0.0

4 months ago