php man page for hash_file

Query: hash_file

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

HASH_FILE(3)								 1							      HASH_FILE(3)

hash_file - Generate a hash value using the contents of a given file

SYNOPSIS
string hash_file (string $algo, string $filename, [bool $raw_output = false])
DESCRIPTION
PARAMETERS
o $algo - Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4", etc..) o $filename - URL describing location of file to be hashed; Supports fopen wrappers. o $raw_output - When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits.
RETURN VALUES
Returns a string containing the calculated message digest as lowercase hexits unless $raw_output is set to true in which case the raw binary representation of the message digest is returned.
EXAMPLES
Example #1 Using hash_file(3) <?php /* Create a file to calculate hash of */ file_put_contents('example.txt', 'The quick brown fox jumped over the lazy dog.'); echo hash_file('md5', 'example.txt'); ?> The above example will output: 5c6ffbdd40d9556b73a21e63c3e0e904
SEE ALSO
hash(3), hash_hmac_file(3), hash_update_file(3), md5_file(3), sha1_file(3). PHP Documentation Group HASH_FILE(3)
Related Man Pages
wordwrap(3) - php
hash(3) - php
hash_file(3) - php
password_needs_rehash(3) - php
sha1(3) - php
Similar Topics in the Unix Linux Community
Checking for the presence of a string within another string
counting a list of string in a list of txt files
lowercase basedir? get filename
excluding two or more groups of strings from printing
UNIX Pipelines