HOTP constructor

HOTP({String secret, int counter: 0, int digits: 6, OTPAlgorithm algorithm: OTPAlgorithm.SHA1 })

This constructor will create an HOTP instance.

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

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

Implementation

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