Class DefaultLUHNCalculator
java.lang.Object
org.jpos.core.DefaultLUHNCalculator
- All Implemented Interfaces:
LUHNCalculator
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DefaultLUHNCalculator
public DefaultLUHNCalculator()
-
-
Method Details
-
calculate
Compute card's check digit (LUHN)- Specified by:
calculatein interfaceLUHNCalculator- Parameters:
p- PAN (without checkdigit)- Returns:
- the checkdigit
- Throws:
InvalidCardException
-
verify
Verify Card's PAN- Specified by:
verifyin interfaceLUHNCalculator- Parameters:
p- full card PAN- Returns:
- true if pan LUHN's matches
- Throws:
InvalidCardException
-