smartotp 3.1.4 copy "smartotp: ^3.1.4" to clipboard
smartotp: ^3.1.4 copied to clipboard

RFC6238 Time-Based One-Time Password / Google Authenticator Library

smartotp.sdk.flutter #

Getting started #

To make it easy for you to get started with GitLab, here's a list of recommended next steps.

Already a pro? Just edit this README.md and make it your own. Want to make it easy? Use the template at the bottom!

Add your files #

cd existing_repo
git remote add origin https://gitlab.com/mytel3/smartotp.sdk.flutter.git
git branch -M main
git push -uf origin main

eg #

import 'package:otp/otp.dart';

void main() {
  String secret = "MZXW6YTBOI======";

  // Generate TOTP code with SHA1
  int totpCode = OTP.generateTOTPCode(secret, DateTime.now().millisecondsSinceEpoch);
  print("Generated TOTP: $totpCode");

  // Generate HOTP code with a counter
  int counter = 7;
  int hotpCode = OTP.generateHOTPCode(secret, counter);
  print("Generated HOTP: $hotpCode");
}
0
likes
0
points
44
downloads

Publisher

unverified uploader

Weekly Downloads

RFC6238 Time-Based One-Time Password / Google Authenticator Library

Repository (GitLab)
View/report issues

License

unknown (license)

Dependencies

base32, crypto, logging, timezone

More

Packages that depend on smartotp