sha1_file() function calculates the sha1 hash of the file specified by filename using the » US Secure Hash Algorithm 1, and returns that hash. The hash is a 40-character hexadecimal number.
[table caption=”” width=”100%” colwidth=”15%|15%|15%|55%” colalign=”left|lef|lef|left”]
Name, Required /Optional, Value Type, Description
filename , Required, String , The file for which hash is to be calculated.
raw_output, Optional, boolen, A boolean value that specifies hex or binary output format:
,,If TRUE, Raw 20 character binary format data will be returned.
,,If FALSE, Default 40 character hex number will be returned.
[/table]
This function returns the string, calculated for SHA-1 hash of a file on success, or FALSE on failure.
[table caption=”” width=”100%” colwidth=”25%|75%” colalign=”left|left”]
Version, Description
PHP 5.1.0 , Changed the function to use the streams API. It means that you can use it with wrappers like sha1_file(‘http://www.tutorialmines.net/..’)
[/table]
<?php $filename = "example1.txt"; $sha1file = sha1_file($filename); echo $sha1file; ?>
When it comes to children, there’s one universal truth: the right toy can spark imagination, build skills, and make memories…
In today’s digital age, where screens and gadgets dominate our children’s lives, there’s something heartwarming about a well-loved plush toy…
In a world dominated by screens and fast-paced routines, it’s easy to forget the simple magic of a toy in…
In the heart of Delhi’s vibrant streets lies a world where imagination meets innovation — the magical universe of toys.…
When was the last time a toy truly amazed you—not just as a product, but as a thoughtful tool for…
In the digital age, the way we experience childhood has changed, but the essence remains the same—imagination, exploration, and joy.…