Support new Naranja validation algorithm
Description: Naranja has a new bespoke validation check-digit formula. Like its predecessor, a variation on Luhn mod10. At least for now, Naranja PANs are valid if they pass exactly one of the two algorithms (legacy or new).
Unit Tests: 5938 tests, 79882 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed
Rubocop: 798 files inspected, no offenses detected
Draft Todos:
- [ ] Verify XOR for two algos
- [ ] Get a longer list of valid card numbers to test against
- [ ] Add tests for negative case
- [ ] Add tests to cover XOR case
See the algorithm description from Naranja below:
Ok.
I now see that this is just Luhn written in a roundabout way. That explains why the algorithm is labeled Luhn 10 😅.
I'm going to keep this PR around for a minute while I triple check. I'd like to get an understanding of why this was passed off as a new bespoke algorithm. Guessing communication issues are at play here.
Ok.
I now see that this is just Luhn written in a roundabout way. That explains why the algorithm is labeled
Luhn 10😅. I'm going to keep this PR around for a minute while I triple check. I'd like to get an understanding of why this was passed off as a new bespoke algorithm. Guessing communication issues are at play here.
Those cheeky Naranjarians. Taking credit for the Luhn algo.
@mashton is this one okay to be closed now?