TOTP.secret constructor

TOTP.secret(
  1. List<int> secret, {
  2. int digits = 6,
  3. int period = 30,
})

Create a new TOTP instance for a given secret.

@param secret - The secret. @param digits - The number of digits in the code. @param period - The number of seconds in the time period.

Implementation

factory TOTP.secret(
  List<int> secret, {
  int digits = 6,
  int period = 30,
}) {
  return TOTP(
    HOTP(secret),
    digits: digits,
    period: period,
  );
}