If I want to generate a checksum, for some product attributes concatanated with a custom string, and use this checksum later on, to see if any attribute in the same product changed over time, is php's crc32
method suitable?
For example, let's say I have a product with the following attributes:
color: red
size: xl
I am trying to get the checksum for this product by creating the following string: red||xl
and then running the crc32
function on this string. If later on, the size is identified differently, or the product gets a new attribute, I want to identify this difference by the changing of the checksum on this product.
The baseline is, am I safe in using the crc32
method for this, or I should opt for a slower but more secure hashing algorithm, with less collission?