Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gallolabs/passwd-verifier
Password verifier
https://github.com/gallolabs/passwd-verifier
Last synced: 5 days ago
JSON representation
Password verifier
- Host: GitHub
- URL: https://github.com/gallolabs/passwd-verifier
- Owner: gallolabs
- Created: 2025-01-16T22:58:47.000Z (10 days ago)
- Default Branch: main
- Last Pushed: 2025-01-16T23:26:23.000Z (10 days ago)
- Last Synced: 2025-01-17T00:18:45.359Z (10 days ago)
- Language: TypeScript
- Size: 90.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Password Verifier
Validates passwords with support of htpasswd format.
```javascript
import {verifyPasswd, detectHashType} from '@gallolabs/passwd-verifier'await verifyPasswd('myPasswd', '$2y$05$L/jPI05ltEKrwIjQThJ4keBFKH/aRDpxY9CaaVWYIZcPu0FXdRO6i') // false
await verifyPasswd('iAmNotHacker27!', '$2y$05$L/jPI05ltEKrwIjQThJ4keBFKH/aRDpxY9CaaVWYIZcPu0FXdRO6i') // truedetectHashType('$2y$05$L/jPI05ltEKrwIjQThJ4keBFKH/aRDpxY9CaaVWYIZcPu0FXdRO6i') // BCRYPT
```Supports various format (sha, bcrypt, md5, crypt, plain). Like htpasswd command line, in case of plain password looking like crypt one, crypt is used. You can use options to disable crypt and/or plain. You can use detectHashType to refuse some password hash types in your side.