Class Modulo11
java.lang.Object
com.github.toolarium.security.checkdigit.AbstractModulo<String>
com.github.toolarium.security.checkdigit.Modulo11
Implements the modulo 11.
-
Method Summary
Modifier and TypeMethodDescriptionprotected longcalculateSum(Integer[] digits) Calculate the modulo sumcreateCheckDigit(String data) Calculate the modulo 11 of the given string which contains numbers e.g.static Modulo11Get the instanceMethods inherited from class com.github.toolarium.security.checkdigit.AbstractModulo
calculateModulo, parseString, validate
-
Method Details
-
getInstance
Get the instance- Returns:
- the instance
-
createCheckDigit
Calculate the modulo 11 of the given string which contains numbers e.g.4563 9601 2200 199or446-667-65- Parameters:
data- the data to parse- Returns:
- the modulo result
- See Also:
-
calculateSum
Description copied from class:AbstractModuloCalculate the modulo sum- Specified by:
calculateSumin classAbstractModulo<String>- Parameters:
digits- the integer digits- Returns:
- the sum
- See Also:
-