public class DefaultLUHNCalculator extends java.lang.Object implements LUHNCalculator
Constructor and Description |
---|
DefaultLUHNCalculator() |
Modifier and Type | Method and Description |
---|---|
char |
calculate(java.lang.String p)
Compute card's check digit (LUHN)
|
boolean |
verify(java.lang.String p)
Verify Card's PAN
|
public char calculate(java.lang.String p) throws InvalidCardException
calculate
in interface LUHNCalculator
p
- PAN (without checkdigit)InvalidCardException
public boolean verify(java.lang.String p) throws InvalidCardException
verify
in interface LUHNCalculator
p
- full card PANInvalidCardException