I am trying to verify that this hash was not messed with, and use the time stamp to do so. I know there is no way to reverse a hash without brute force. How would I be able to verify it at a later date?
Is there a php code I dont know about?
Please and thank you.
$log = fopen($datalog, 'a') or die("can't open file");
echo " ";
echo "IP: ";
echo $address;
$addressHash = hash_hmac('sha256', $address, $key);
$add64 = base64_encode($addressHash);
fwrite ($log, $add64);
echo " ";
echo "INFO: ";
echo $info;
$infoHash = hash_hmac('sha256', $info, $key);
$info64 = base64_encode($infoHash);
fwrite ($log, $info64);
echo " ";
echo "TIMESTAMP: ";
echo $datetimeStamp;
$tsHash = hash_hmac('sha256', $datetimeStamp, $key);
$ts64 = base64_encode($tsHash);
fwrite ($log, $ts64);
echo " ";
echo "COUNTRY: ";
echo $country;
$countryHash = hash_hmac('sha256', $country, $key);
$country64 = base64_encode($countryHash);
fwrite ($log, $country64);
echo " ";
echo "LATITUDE: ";
echo $lat;
$latHash = hash_hmac('sha256', $lat, $key);
$lat64 = base64_encode($latHash);
fwrite ($log, $lat64);
echo " ";
echo "LONGITUDE: ";
echo $long;
$longHash = hash_hmac('sha256', $long, $key);
$long64 = base64_encode($longHash);
fwrite ($log, $long64);
fclose($log);
}