UOtp class abstract

Offline one-time codes tied to a POS serial and today's date (Verhoeff checksums), for terminals without internet. final code = UOtp.generateOtp(serial, 8);

Constructors

UOtp()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

generateAdminOtp(String posSerial, int length) → String
New admin code that validates against the serial alone.
generateOtp(String posSerial, int length) → String
New code for posSerial; length includes 3 check digits (min 4). UOtp.generateOtp("POS1234", 8)
generateVerhoeff(String num) → String
Verhoeff check digit of a digit string. UOtp.generateVerhoeff("236") → "3"
verifyAdminOtp(String posSerial, String otp) → bool
True when an admin code is valid today for posSerial.
verifyOtp(String posSerial, String otp) → bool
True when otp was generated today for posSerial. UOtp.verifyOtp(serial, input)