News for hackers. Stuff that matters.
Re:GUIDs Are Not the Only Answer by ivanb on Thursday January 07, 2021 @02:13AM (#25668148)
> Sometimes, we want a zero inconsistency approach to storing objects, so it might make sense to make the identifier (or part of it) the checksum of the content that is to be stored. This guarantees that the underlying content has not been modified.

No, it does not. I come across this false statement again and again. It seems that a lot of developers do not understand what checksums or hashes guarantee and what they absolutely do not guarantee.

Let's set this once and for all:

1. Differing checksums or hashes guarantee that the content is different. 2. Identical checksums or hashes do not guarantee anything. The content could be identical or not.

Re:GUIDs Are Not the Only Answer by CodesInChaos on Thursday January 07, 2021 @07:23AM (#25670212)
If the hash function is collision resistant (e.g. SHA-256) unique hashes are guaranteed in practice.
Re:GUIDs Are Not the Only Answer by ivanb on Friday January 08, 2021 @08:29AM (#25684496)
False.