jaguar_otp 0.1.0 copy "jaguar_otp: ^0.1.0" to clipboard
jaguar_otp: ^0.1.0 copied to clipboard

Dart 1 only

TOTP utilities for Dart and Jaguar.dart

example/jaguar_otp_example.dart

// Copyright (c) 2017, teja. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:jaguar_otp/jaguar_otp.dart';
import 'package:jaguar_otp/src/qr.dart';

main() async {
  // Generate secret for an account
  final String secret = Totp.generateSecret();
  print('secret');

  // Create TOTP Uri
  final String uri = Totp.makeUri('teja', 'tejainece@gmail.com', secret);
  print(uri);

  // Create TOTP Uri Qr code
  final qr = new Qr(uri);
  await qr.save('qr.png');

  // Generate for present time
  print(Totp.generateCode(secret));
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

TOTP utilities for Dart and Jaguar.dart

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

base32, crypto, http

More

Packages that depend on jaguar_otp