John Davidson

php - Will same files have same hashes when uploaded from different devices?

0 comments
Message:


Let's say I use this php function hash_file to get the hash of a particular file during upload.


Then that same file uploaded was printed out and then scanned in another device and upload on same server to get hash...


Will the hash of the scanned be the same as the original uploaded or different since they are uploaded from different platform but same file?



My Answer:
The hash of a file should be the same regardless of the device used to upload it. The hash is calculated based on the contents of the file, so as long as the file itself is the same, the hash should be the same as well. However, there could be some factors that may cause the hash to be different, such as different encoding or formatting of the file on different devices. But in general, if the file is exactly the same, the hash should be the same as well.

Rate this post

4 of 5 based on 6122 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us