MD5 Authentication Technique in Java – Message Digest

MD5 Authentication Technique in Java – Message Digest
Now a days it is so common that all the user passwords go through a authentication process before it gets stored in the database. One of the most common technique is MessageDigest (MD5) technique.

First let us try to understand what Message Digest is,

What is Message Digest?
MessageDigest is a java class for algorithms such as SHA-1 or SHA-256. Please note that MessageDigest(MD5) is a secure one-way hash function.

What is meant by SHA-1 / SHA-256?
SHA stands for Secure Hash Algorithm is a series of cryptographic hash algorithms designed by NSA – USA. SHA-1 is commonly displayed as 40 character Hexa-decimal number. SHA-256 cryptographic algorithms, single aimed hash functions. SHA-2 family consists of SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256. (Source)

Cons:
Please note that, MD5 Hashing technique is Not Recommended Technique as hackers can easily decrypt the password

MD5 is one-way hashing function, that is you can encrypt the password using code, But you cannot decrypt with the code.

Now let us see an example for MD5 Technique,

Output:

op1

Leave a Reply

Your email address will not be published. Required fields are marked *