4 ms·
I'm surprised YOU even know. meaning two things: you understand the algorithm and you checked the algorithm. This is like discovering a compiler bug from code
by m463 6y ago
I'm surprised YOU even know.
meaning two things: you understand the algorithm and you checked the algorithm.
This is like discovering a compiler bug from code that compiled - statistically unlikely, and requires deeper expertise.
I mean I shouldn't be surprised, it's HN.
- isatty 6y agoNot surprising that they discovered it, even if they weren’t aware of it - I’m guessing this is how it went: person tried to use his card number on some random website, but it kept telling him that his number is invalid. They scratch their head and double, triple check that number and then do a google search.
- mattl 6y agoI'm fairly sure someone else suggested it as a possibility, because why the heck would a bank issued debit card number not work on say... Amazon.com?
- vmception 6y agonpm i card-validator
- tclancy 6y agohttps://www.investopedia.com/terms/l/luhn-algorithm.asp https://www.investopedia.com/terms/l/luhn-algorithm.asp
- jetbooster 6y agoSee also https://gchq.github.io/CyberChef/#recipe=Luhn_Checksum https://gchq.github.io/CyberChef/#recipe=Luhn_Checksum()
- MAGZine 6y agoThe algorithms are not complicated.
- c9fc42ad 6y agoIt was even originally designed to be calculated mechanically
- deleted 6y ago[deleted]
- mhh__ 6y agoIf the code compiles sometimes the bug is pretty obvious!
- stevula 6y agoThe Luhn algorithm is fairly common in software interviews, though I agree I would never think to check it if my card failed.