HOTP constructor

HOTP({
  1. required String secret,
  2. int counter = 0,
  3. int digits = 6,
  4. OTPAlgorithm algorithm = OTPAlgorithm.SHA1,
})

This constructor will create an HOTP instance.

All parameters are mandatory however counter, digits and algorithm have a default value, so can be ignored.

Will throw an exception if the line above isn't satisfied.

Implementation

HOTP({
  required String secret,
  this.counter = 0,
  int digits = 6,
  OTPAlgorithm algorithm = OTPAlgorithm.SHA1,
}) : super(
        secret: secret,
        digits: digits,
        algorithm: algorithm,
      );