Hi,
I suggest that when this is implemented it should not be a MD5 hash. This is not a recommended way to do this anymore.
It is more usual to use an algorithm suited to hashing passwords like bcrypt, scrypt or PBKDF2 with a salt which is also saved in the database. This is then hard to bruteforce if the database is compromised.
I Think if this is implemented it should be done in a way that is considered good by todays standards.
References:
https://crackstation.net/hashing-security.htm#faq
https://www.owasp.org/index.php/Hashing_Java
http://security.blogoverflow.com/2013/09/about-secure-password-hashing/
/Paul