Site Masthead: Nick's Place in non-serif white text superimposed over a bright orange high contrast tinted photograph of a brick wall taken in an extreme close up. The brick is photographed with the long continuous lines of grout running vertically. The image is displayed upside-down so the disappearing point for the grout is below the image.

Nick's Place

Nick's Place: CCVerf

What CCVerf is:

What CCVerf does:

What CCVerf does not do:

Why CCVerf is useful:

What CCVerf accepts at its arguments (inputs):

How CCVerf checks the credit card number:

An example of how CCVerf checks the credit card number:


The string "4791-0600-2310-2329" and the integer '1' is passed to CCVerf. CCVerf starts by pulling all of the numerical digits out of the string and placing them in a array, represented by following table:
Array Position 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
Digit Contained 4 7 9 1 0 6 0 0 2 3 1 0 2 3 2 9

CCVerf first checks and sees that the length of the card is sixteen digits, an acceptable length for a card number. It then checks the digit in array position zero and confirms that the first digit is four, since this card was reported as a Visa. CCVerf then doubles every other digit of the array starting at the 00 array position and replaces the original digit with the doubled digit. Leaving the array in the following state:

Array Position 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
Digit Contained 8 7 9 1 0 6 0 0 4 3 2 0 4 3 4 9

When the digits are added the total is sixty, since sixty is divisible by ten, and the card has passed all the other requirements the card is considered valid.

Where to get CCVerf:

License:

How to contact CCVerf's author: