MD5 or SHA1 is used to hash passwords, which is cryptographically broken.
Use a memory-hard KDF such as Argon2, scrypt, or PBKDF2 with a salt for passwords.