fixes #2127: added support for password hashes other than MD5

Maybe a time to make the salt length configurable too here?

Nitpick - missing EOL at the EOF.