htpasswd Generator Online
Ek username aur password se bcrypt ya SHA-1 ke saath ek .htpasswd user line generate karein, seedha aapke browser mein. Credentials aapke device par rehte hain.
htpasswd Generator aapke password ko aapke browser mein hash karta hai — bcrypt ek lazily loaded module mein aur SHA-1 Web Crypto API ke zariye. Jo username aur password aap enter karte hain woh kabhi aapke device se bahar nahi jaate aur kabhi ArrayKit ko upload nahi hote.
Basic Auth Generator kholein
htpasswd Generator ke baare mein
htpasswd Generator ek username aur password ko Apache ya nginx HTTP basic auth ke liye ek single .htpasswd line mein badal deta hai. bcrypt chunein, woh recommended salted scheme jise Apache $2y$ ke roop mein likhta hai, ya purane setups ke liye legacy {SHA} scheme (unsalted SHA-1, Base64). Tool ek ready user:hash line output karta hai jise aap copy ya download karke apni .htpasswd file mein append kar sakte hain, phir AuthType Basic ya nginx auth_basic_user_file se ek directory protect kar sakte hain. Yeh un sysadmins aur developers ke liye suitable hai jo ek staging site, ek internal dashboard, ya ek reverse proxy ke peeche ek directory lock kar rahe hain. bcrypt hashing har baar ek fresh random salt ke saath chalti hai aur SHA-1 Web Crypto API use karta hai — sab aapke browser mein, isliye jo password aap type karte hain woh kabhi aapke device se bahar nahi jaata.
Features
- Ek username aur password se ek .htpasswd file ke liye ek user:hash line generate karein
- Ek random salt ke saath bcrypt scheme, Apache ke $2y$ prefix ke saath emit
- Purane Apache aur nginx configs ke liye legacy {SHA} scheme (Base64 SHA-1)
- Line copy karein ya use seedha ek .htpasswd file mein download karein
- Colon, spaces, ya line breaks waale usernames reject karta hai jo file tod dete
- Har bcrypt run ek fresh hash produce karta hai taaki identical passwords kabhi match na karein
- Apache mod_auth_basic aur nginx auth_basic_user_file dono ke liye kaam karta hai
- Password ko aapke browser mein hash karta hai, kuch server ko nahi bheja jaata
htpasswd Generator kaise use karein
- Jis username aur password se aap ek directory protect karna chahte hain use type karein
- bcrypt (recommended) ya legacy SHA-1 {SHA} algorithm chunein
- Generated user:hash line copy karein ya .htpasswd file download karein
- Line ko apne server ki .htpasswd mein append karein aur use auth config se reference karein
Example
Input
username: admin
password: password
algorithm: SHA-1
Output
admin:{SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=
SHA-1 {SHA} + Base64 produce karta hai; bcrypt iski jagah admin:$2y$... emit karega.
Common errors aur troubleshooting
- Apache 'crypt not supported' log karta hai ya bcrypt line reject hoti hai. — .htpasswd mein bcrypt ke liye mod_authn_file ke saath Apache 2.4 ya baad ka chahiye. Purane servers par {SHA} scheme par switch karein ya Apache upgrade karein.
- Poori line ek row par aa gayi aur auth kabhi succeed nahi hoti. — Har .htpasswd entry apni khud ki line honi chahiye jo ek newline mein khatam ho. File download karna aapke liye newline add karta hai; agar aap paste karte hain to line ke baad Enter dabayein.
- Username mein ek colon hai aur file use galat split karti hai. — Apache har entry ko pehle colon par split karta hai, isliye username mein ek colon parsing tod deta hai. Colon hatayein — generator isi kaaran ise block karta hai.
- Ek {SHA} hash copy kiya lekin login phir bhi fail hota hai. — {SHA} scheme unsalted SHA-1 hai aur password par case-sensitive hai. Exact password dobara check karein, aur internet-facing kisi bhi cheez ke liye bcrypt prefer karein.
Aksar pooche jaane wale sawaal
- Ek .htpasswd file ke liye mujhe kaunsa algorithm use karna chahiye?
- Network par reachable kisi bhi cheez ke liye bcrypt use karein — yeh salted aur jaan-boojh kar slow hai, isliye brute force resist karta hai. {SHA} SHA-1 scheme unsalted hai aur sirf un legacy servers ke liye use karne layak hai jo bcrypt nahi chala sakte.
- bcrypt hash $2a$ ke bajaye $2y$ se kyun shuru hota hai?
- $2y$ woh prefix hai jo Apache ka htpasswd tool likhta hai. bcrypt libraries aksar $2a$ ya $2b$ emit karti hain, lekin algorithm identical hai, isliye yeh generator prefix ko $2y$ mein normalise karta hai taaki match kare jo Apache disk par produce karta hai.
- Main generated line ko apni .htpasswd file mein kaise add karoon?
- user:hash line copy karein, ya .htpasswd file download karein, aur line ko apni khud ki row ke roop mein append karein. Phir AuthUserFile (Apache) ya auth_basic_user_file (nginx) ko us file par point karein aur server reload karein.
- Kya same password har baar same htpasswd line produce karta hai?
- bcrypt ke saath, nahi — har run ek fresh random salt use hota hai, isliye identical passwords alag hashes dete hain jo phir bhi verify hote hain. {SHA} scheme ke saath hash unsalted hai, isliye same password hamesha same line deta hai.
- Kya jo password main type karta hoon woh hash hone ke liye ek server ko bheja jaata hai?
- Nahi. bcrypt aapke browser mein chalta hai aur SHA-1 built-in Web Crypto API use karta hai, isliye jo username aur password aap enter karte hain woh aapke device par hash hote hain aur kabhi ArrayKit ko upload nahi hote.
Related tools
Saare ArrayKit tools