Hacker News new | ask | show | jobs
by ineiti 1880 days ago
Interesting, but why does the "Check" use a handmade hashing algorithm that is just summing up all bytes?

A much safer implementation would be to take the sha256 of the key and only show the 2 rightmost bytes.

1 comments

Good idea. I will change it, should be live in 1 hour. I am going to SHA-256 hash it, then add the bytes of the hash and mod by 10000. It's better than just taking the first two bytes, because I want a 4 digit number.