The
sha1_file() PHP string function is used to convert a file to a sha1 hash for encryption.

<?php
$myFile = "myfile.txt";
$encryptedContents = sha1_file($myFile);
echo $encryptedContents;
?>
048a91ef9d6edf1910213e293a8d27be19ab4dd1
The string in that particular file when I ran the sha1_file() function on it read "In the year 1978 the world will end."