How to convert string into MD5 hash?

Here in this article will explain how to convert a string value to md5 hash value, i.e. Using we can convert a string into Md5 hash value, which is encryption.
MD5 is an acronym for Message-Digest 5– a fast and powerful method of increasing security to file transfers and request message transfers.
The way it works is the user enters an input string, and the md5 algorithm will generate a 32-character string in hexadecimal characters. The characters will always be hexadecimal, and the string will always be 32 characters in length.
Once a string is hashed into a md5 hash, it cannot be unhashed via any “un-md5” algorithm. The only way is to use an MD5 cracker tool, which queries an extensive database of strings and their associated md5 hashes.
Once your md5 hash code is generated, you can deliver it to the expected receiver, and they can use that hash to match against their result of performing a md5 hash on their own values. If the hashes match, then you can be confident that the data was sent correctly.

CODE to convert string into md5 hash value: