9 ms·
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 sha2
by ineiti 5y 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.
- boris1 5y agoGood 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.