md5 or sha1 is used to hash sensitive values such as passwords, which is cryptographically weak.
Use password_hash() with PASSWORD_DEFAULT and verify with password_verify().