AuthTOTP class

Constructors

AuthTOTP.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

createSecret({int length = 32, bool autoPadding = false, SecretKeyStyle secretKeyStyle = SecretKeyStyle.upperCase}) String
The secret is generated using the Base32 alphabet and is suitable for use in TOTP (Time-based One-Time Password) applications.
generateTOTPCode({required String secretKey, required int interval}) String
Generates an OTP code based on the provided secret and interval.
getQRCodeUrl({required String appName, required String secretKey, String? issuer = 'auth_otp'}) String
  • appName : App name
  • secretKey : Secret key
  • verifyCode({required String secretKey, required String totpCode, int interval = 30}) bool
    Verifies a given TOTP code against a secret key.