The md5 (message-digest algorithm) is used for calculating the hash of the string value.
Md5 takes the input message of arbitrary length and produces as output with 128-bit "fingerprint" or "message digest" of the input.
The MD5 algorithm is intended for digital signature applications, where a large file must be "compressed" in a secure manner before being encrypted with a private (secret) key under a public-key cryptosystem such as RSA (Rivest, Shamir, and Adelman) .
php developer Syntax :
string md5( string source [, bool raw_output]);
click below button to copy the code. php tutorial - team
Syntax Explanation:
string Source - defines the input string.
raw_output – The raw output will work like a Boolean function that is : If TRUE it sets raw 16-character binary format. If FALSE (default) it sets raw 32-character hex number format.
click below button to copy the code. php tutorial - team
php program Code Explanation :
In this echo statement we call the “md5” string function that will be used for calculating the hash function value for the term “wikitechy” .
In this echo statement we call the “md5” string function that will be used for calculating the hash function value of the term wikitechy and here we use the Boolean function set as true so the raw output of the encrypted text is displayed only the 16 characters in your browser.
php coding Sample Output :
Output “wikitechy” is encrypted using md5 algorithm which will encrypt by the raw 32-character hex number format.
Output “wikitechy” is encrypted using md5 algorithm whose argument value set is true which will encrypt by the raw 16-character binary format.