First of all, I'm not really sure if this should be on stackoverflow but I thought I would try to ask anyway.
In the past I have always used the luhn algorithm for error checking in credit card numbers, but today I thought I would implement the verhoeff algorithm in php, mainly to kill time.
I tested it out on my own card numbers and it worked fine, which started me thinking about whether I should use verhoeff over luhn for my credit card number error checking in the future.
Now my questions:
Would there be any significant advantage in using verhoeff over luhn?
I know that verhoeff is slightly more complex in it's implementation and it can detect more transcription errors than luhn, which would naturally lead me to believe it's a bit slower, but aside from the advantage of detecting more transcription errors and the dis-advantage (if you can really call it that) of being slightly slower, I can't think of any other real differences.
Will the verhoeff algorithm work for all major cards?
I know that luhn will work for all of the major cards but will verhoeff also work for all of them? I am under the assumption that it will work for all of them but I thought I should check anyway.
Is there a reason that I have only seen people using luhn to check credit card numbers?
In all of my time as a developer I have only really seen people using the luhn algorithm to check credit card numbers. Is there a good reason for this, or is it simply that luhn is more well known?
Any help would be appreciated, thank you for you time.