now method

String now ()

Generate the OTP with current time.

@return {OTP}

@example TOTP totp = dotp.TOTP('BASE32ENCODEDSECRET'); totp.now(); // => 432143

Implementation

String now() {
  DateTime _now = DateTime.now();
  int _formatTime = Util.timeFormat(_now, this.interval);

  return super.generateOTP(_formatTime);
}