Current Location: Home> Function Categories> md5

md5

Calculate the md5 hash value of a string
Name:md5
Category:String
Programming Language:php
One-line Description:Calculate the MD5 hash of the string.

Definition and usage

The md5() function calculates the MD5 hash of a string.

md5() function uses RSA data security, including the MD5 message digest algorithm.

Interpretation from RFC 1321 - MD5 message digest algorithm: The MD5 message digest algorithm takes information of any length as input value and converts it into a 128-bit length "fingerprint information" or "message digest" value to represent this input value, and uses the converted value as the result. The MD5 algorithm is mainly designed for digital signature applications; in this digital signature application, larger files will be compressed in a secure way before encryption (the encryption process here is done by setting a private key under a public key under a cryptographic system [such as RSA]).

To calculate the MD5 hash of a file, use md5_file() function.

grammar

 md5 ( string , raw )
parameter describe
string Required. Specifies the string to be calculated.
raw

Optional. Specify hexadecimal or binary output format:

  • TRUE - Original 16-character binary format
  • FALSE - Default. 32 characters hexadecimal number
Similar Functions
Popular Articles