steam_totp 0.0.1 copy "steam_totp: ^0.0.1" to clipboard
steam_totp: ^0.0.1 copied to clipboard

A Dart library for generating 5-character alphanumeric Steam TOTP codes.

example/steam_totp.dart

import 'package:steam_totp/steam_totp.dart';

void main() {
  final SteamTOTP steamtotp =
      SteamTOTP(secret: 'OJZ2BP7STWSLUD7I23Q5AYZELZB5OAFU');

  // By default, the current epoch time will be used.
  String code = steamtotp.generate();
  print(code); // OUTPUT: 5-character alphanumeric string.

  // This behavior can be overridden by passing in [unixSeconds] explicitly.
  final int unixSeconds = DateTime.now().millisecondsSinceEpoch ~/ 1000;
  code = steamtotp.generate(unixSeconds);
  print(code); // OUTPUT: 5-character alphanumeric string.
}
1
likes
110
pub points
84%
popularity

Publisher

verified publisherpanda.observer

A Dart library for generating 5-character alphanumeric Steam TOTP codes.

Repository (GitHub)
View/report issues

Topics

#crypto #cryptography #mfa #otp #security

Documentation

API reference

Funding

Consider supporting this project:

www.buymeacoffee.com

License

MIT (license)

Dependencies

base32, hashlib

More

Packages that depend on steam_totp