Current Location: Home> Function Categories> md5_file

md5_file

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

Definition and usage

md5_file() function calculates the MD5 hash of a file.

md5_file() 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 string, use the md5() function.

grammar

 md5_file ( file , raw )
parameter describe
file Required. Specify the documents to be calculated.
raw

Optional. Boolean value, specifying hexadecimal or binary output format:

  • TRUE - Original 16-character binary format
  • FALSE - Default. 32 characters hexadecimal number