{"id":22344067,"url":"https://github.com/dethdkn/ldap-passwords","last_synced_at":"2025-04-11T04:04:45.872Z","repository":{"id":216305518,"uuid":"740987752","full_name":"dethdkn/ldap-passwords","owner":"dethdkn","description":"🔑 ldap-passwords offers secure password hashing and verification using LDAP password algorithms.","archived":false,"fork":false,"pushed_at":"2025-02-23T23:17:10.000Z","size":341,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T04:04:41.357Z","etag":null,"topics":["ldap","md5","passwords","sha512","ssha"],"latest_commit_sha":null,"homepage":"https://ldap-passwords.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dethdkn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-09T13:28:58.000Z","updated_at":"2025-02-26T23:06:13.000Z","dependencies_parsed_at":"2024-01-24T14:35:53.583Z","dependency_job_id":"30710691-034d-43ac-bc22-00136c3a5f9d","html_url":"https://github.com/dethdkn/ldap-passwords","commit_stats":null,"previous_names":["dethdkn/ldap-passwords"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dethdkn%2Fldap-passwords","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dethdkn%2Fldap-passwords/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dethdkn%2Fldap-passwords/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dethdkn%2Fldap-passwords/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dethdkn","download_url":"https://codeload.github.com/dethdkn/ldap-passwords/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339286,"owners_count":21087215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ldap","md5","passwords","sha512","ssha"],"created_at":"2024-12-04T09:07:56.786Z","updated_at":"2025-04-11T04:04:45.852Z","avatar_url":"https://github.com/dethdkn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"http://ldap-passwords.vercel.app/\"\u003e\n\u003ch1 align=\"center\"\u003eLdap-passwords\u003c/h1\u003e\n\u003c/a\u003e\n\u003cp align=\"center\"\u003eldap-passwords offers secure password hashing and verification using LDAP password algorithms.\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"https://www.npmjs.com/package/ldap-passwords\"\u003e\n      \u003cimg src=\"https://img.shields.io/npm/dt/ldap-passwords?color=%23c12127\u0026label=downloads\u0026logo=npm\" alt=\"npm\"/\u003e\n   \u003c/a\u003e\n   \u003ca href=\"https://github.com/dethdkn/ldap-passwords/blob/main/LICENSE\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/license/dethdkn/ldap-passwords?color=%233da639\u0026logo=open%20source%20initiative\" alt=\"License\"/\u003e\n  \u003c/a\u003e\n   \u003ca href=\"https://gitmoji.dev\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67\" alt=\"Gitmoji\"/\u003e\n   \u003c/a\u003e\n   \u003ca href=\"https://rosa.dev.br\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/check me!-👻-F28AA9\" alt=\"rosa.dev.br\"/\u003e\n   \u003c/a\u003e\n\u003c/p\u003e\n\u003ch3 align=\"center\"\u003e\n   \u003ca href=\"https://ldap-passwords.vercel.app/\"\u003e\n      📚 Full Documentation\n   \u003c/a\u003e\n\u003c/h3\u003e\n\n## ✨ Features\n\n- Encrypt a plain text password with Ldap passwords algorithm.\n- Verify encrypted passwords.\n- No external dependencies.\n\n## 🪄 Supported Algorithms\n\n- SHA512 CRYPT\n- SSHA\n- MD5\n\n## 🚀 Setup\n\n1. Install with your favorite package manager:\n   - **pnpm** : `pnpm i ldap-passwords`\n   - npm : `npm i ldap-passwords`\n   - yarn : `yarn add ldap-passwords`\n   - bun : `bun add ldap-passwords`\n\n## ⚡️ SHA512 CRYPT\n\n1. Import the function into your project:\n```ts\nimport { sha512Crypt, verifySha512Crypt } from 'ldap-passwords'\n```\n\n2. Encrypt a plain text password using sha512 and a random salt:\n```ts\nconst encryptedPassword = sha512Crypt('mySuperSecretPassword')\n// return {CRYPT}$6$NQgPVC0up/oNVCb4$Aduz92Zfo/PFDE/XhvA3QmSqHquqdNiCdZvc9N5/UTpEUepMdd/6Mq/TeoM07wvyxHpg8ELGVzTWZt2e7Z9LY/\n```\n\n3. Encrypt a plain text password using sha512 and a custom salt:\\\n**The maximum length of salt is 16 characters**\n```ts\nconst encryptedPassword = sha512Crypt('mySuperSecretPassword', 'myDopeCustomSalt')\n// return {CRYPT}$6$myDopeCustomSalt$4ENRn.vwcs09z0fjr6Jt3NMOFVkn.p9v7ilDcK/CwRnQm48Y5HawkiGivh4gBTLwSY4SQNfCAe05E1nCTpZ0u.\n```\n\n4. Validate your plain text password with a sha512 encrypted password:\\\n**The sha512 password can be either a single string or an array of strings. The plain text password will be compared to each sha512 password and the function will return true if any of them matches**\n```ts\nconst isValid = verifySha512Crypt('mySuperSecretPassword', arrayOfSha512Passwords)\n// return true or false\n```\n\n## 💡 SSHA\n\n1. Import the function into your project:\n```ts\nimport { ssha, verifySSHA } from 'ldap-passwords'\n```\n\n2. Encrypt a plain text password using SSHA:\n```ts\nconst encryptedPassword = ssha('mySuperSecretPassword')\n// return {SSHA}sTIysPunEI4boe6OwgQO+/tRZao2OWJIbDMvY0g2UlM=\n```\n\n3. Validate your plain text password with a MD5 encrypted password:\\\n**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**\n```ts\nconst isValid = verifySSHA('mySuperSecretPassword', arrayOfSSHAPasswords)\n// return true or false\n```\n\n## 💥 MD5\n\n1. Import the function into your project:\n```ts\nimport { md5, verifyMD5 } from 'ldap-passwords'\n```\n\n2. Encrypt a plain text password using md5:\n```ts\nconst encryptedPassword = md5('mySuperSecretPassword')\n// return {MD5}aTVgaG9NWR2N1eNABkQgYQ==\n```\n\n3. Validate your plain text password with a MD5 encrypted password:\\\n**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**\n```ts\nconst isValid = verifyMD5('mySuperSecretPassword', arrayOfMD5Passwords)\n// return true or false\n```\n\n## 🔍 Verify All\n\n1. Import the function into your project:\n```ts\nimport { ldapVerifyAll } from 'ldap-passwords'\n```\n\n2. Validate your plain text password with a MD5, SSHA or SHA512 encrypted password:\n**The hashed password can be either a single string or an array of strings. The plain text password will be compared to each hashed password and the function will return true if any of them matches**\n```ts\nconst isValid = ldapVerifyAl('mySuperSecretPassword', arrayOfHashedPasswords)\n// return true or false\n```\n\n## 📝 License\n\nCopyright © 2024 [Gabriel 'DethDKN' Rosa](https://github.com/dethdkn)\\\nThis project is under [MIT license](https://github.com/dethdkn/ldap-passwords/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdethdkn%2Fldap-passwords","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdethdkn%2Fldap-passwords","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdethdkn%2Fldap-passwords/lists"}