https://stackoverflow.com/questions/6382116/to-check-if-two-image-files-are-same-checksum-or-hash
to verify whether two images or files are same,
first check file size, if file size are same check checksum
// Checksum uses md5 or sha256
https://stackoverflow.com/questions/14139727/sha-256-or-md5-for-file-integrity
Both SHA256 and MD5 are hashing algorithms. They take your input data, in this case your file, and output a 256/128-bit number. This number is a checksum. There is no encryption taking place because an infinite number of inputs can result in the same hash value, although in reality collisions are rare.
SHA256 takes somewhat more time to calculate than MD5, according to this answer.
Offhand, I'd say that MD5 would be probably be suitable for what you need.
What is checksum
it is check and sum then encoded using a hash algorithm (md5) to append to end of data then send to server for verification :
https://www.dpconline.org/docs/technology-watch-reports/2399-twgn-checksums-addis/file#:~:text=For%20example%2C%20checksums%20can%20be,the%20same%20or%20different%20contents.
https://www.digitizationguidelines.gov/term.php?term=md5checksum#:~:text=Term%3A%20MD5%20(checksum)&text=Definition%3A,from%20Message%2DDigest%20algorithm%205.
!!!!
https://www.youtube.com/watch?v=AtVWnyDDaDI
4 steps
1. client break original content/msg into k number of blocks with n bits each block
2. client sum all k data blocks
3. client add carry over values to the total sum if any
4. do 1s compliment(change 0 to 1s, 1s to 0s)
then append this data to the k number of blocks to send to server
server add all k blocks and check sum, if all 1s accept else reject

No comments:
Post a Comment