Exemplo n.º 1
0
def calc_check_digit(number):
    """Calculate the check digit. The number passed should not have the
    check digit included."""
    return str((6 - luhn.checksum(number[1:])) % 10)
Exemplo n.º 2
0
def calc_check_digit(number):
    """Calculate the check digit. The number passed should not have the
    check digit included."""
    return str((6 - luhn.checksum(number[1:])) % 10)
Exemplo n.º 3
0
from stdnum import luhn

i = 0

while True:
	i += 1
	c =luhn.checksum(str(i))
	print str(i) + str(c)

#print hex(int(str_))
Exemplo n.º 4
0
def check_digit(chunk):
    return alphabet[-luhn.checksum(chunk, alphabet=alphabet)]
Exemplo n.º 5
0
 def invoice_no(self):
     return luhn.checksum()