mirror of
https://github.com/sheumann/hush.git
synced 2024-11-05 06:07:00 +00:00
httpd -m: output salted MD5 hash. By (forrest AT hifulltech.com)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
cc428147c1
commit
dbc6a7a8fd
@ -2347,7 +2347,12 @@ int httpd_main(int argc UNUSED_PARAM, char **argv)
|
||||
#endif
|
||||
#if ENABLE_FEATURE_HTTPD_AUTH_MD5
|
||||
if (opt & OPT_MD5) {
|
||||
puts(pw_encrypt(pass, "$1$", 1));
|
||||
char salt[sizeof("$1$XXXXXXXX")];
|
||||
salt[0] = '$';
|
||||
salt[1] = '1';
|
||||
salt[2] = '$';
|
||||
crypt_make_salt(salt + 3, 4, 0);
|
||||
puts(pw_encrypt(pass, salt, 1));
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user