Readonly
longA human-readable name of the algorithm.
Readonly
nameThe cdigit
name of the algorithm.
Generates the check characters from the argument using the algorithm.
Unlike generate()
, this method returns the check characters only.
The check characters.
SyntaxError
if an algorithm-specific syntax error occurs. Note
that the bundled algorithm objects do not generally throw errors because
they ignore the unknown letters in the string to be protected.
A string without check characters.
Generates the check characters from the argument using the algorithm. This
method is an alphabet-independent equivalent of compute()
, where the
return value and argument are both represented as arrays of each digit's
numerical value.
The check characters decoded to an array of numerical values.
SyntaxError
if the argument contains an invalid numerical value
or any other algorithm-specific syntax error occurs.
A string without check characters decoded to an array of numerical values.
Generates the protected string from the argument using the algorithm. The generated string consists of the original bare string and computed check characters, which are combined in accordance with the algorithm.
The string with check characters.
SyntaxError
if an algorithm-specific syntax error occurs. Note
that the bundled algorithm objects do not generally throw errors because
they ignore the unknown letters in the string to be protected.
A string without check characters.
Splits a protected string into the pair of original bare string and check characters.
The tuple of [string without check characters, check characters].
SyntaxError
if the argument does not contain check characters or
any other algorithm-specific syntax error occurs. Note that the bundled
algorithm objects do not generally throw errors because they ignore the
unknown letters in the string to be protected.
A string with check characters.
Checks if a protected string is valid per the algorithm.
True if the argument is valid.
SyntaxError
if the argument does not contain check characters or
any other algorithm-specific syntax error occurs. Note that the bundled
algorithm objects do not generally throw errors because they ignore the
unknown letters in the string to be protected.
A string with check characters.
Generated using TypeDoc
The common interface for check digit algorithm implementations.