samwilson / phpflickr-cli

A Flickr command-line interface, written in PHP.
https://packagist.org/packages/samwilson/phpflickr-cli
GNU General Public License v3.0
2 stars 1 forks source link

Add xxh3 and other checksum hash functions #28

Open tacman opened 3 weeks ago

tacman commented 3 weeks ago

md5 and sha1 are good for crypographically secure hashes, but is unnecessarily slow for simply collisions avoidance.

it will be easy to allow hashes like xxh3, which can process 15g / second. Since these are often largish files, this saves a tiny bit of time but also is better for the world at large (wasted cpu = more energy).

I can make a PR if you want. Obviously, it's far from urgent, I extracted the ideas for the checksum command in my project, it makes for a great example of how to avoid duplication!

samwilson commented 3 weeks ago

That sounds like a good idea, go for it!

Do you know if there's any info about which hashes are popular on Flickr?