Luhn class

A class that implements the Luhn checksum formula used to validate a variety of identification numbers, such as credit card numbers, IMEI numbers, etc.

Inheritance

Constructors

Luhn()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkDigit(String data) int
Computes the check digit from data.
override
checkDigitAsString(String data) String
Computes the check digit from data as String.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validate(String? data) bool
Validates the data integrity. It assumes that the check digit is appended at end of the data.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited