Python Credit Card Mod10 Check
This is a small python script that contains logic for checking or generating valid (or invalid) credit card numbers. This script is (for instance) intended for people doing data validation for e-commerce applications. It includes the following functions:
- check(cc) - returns True if a given 'cc' string is passes mod10, False otherwise.
- make_number(prefix, length) - generates a mod10-valid credit card number 'length' digits long that starts with a given 'prefix'
- make_invalid_number(prefix,length) - the inverse of make_number, this generates a number with the same characteristics that will fail the mod10 check.