Last active
October 8, 2018 03:23
-
-
Save juucustodio/e4508a7407deeb61608b8388258c1c13 to your computer and use it in GitHub Desktop.
Example how to implement a token generator in Xamarin.Forms Applications. - http://julianocustodio.com/token
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using OtpSharp; | |
using System.Threading; | |
using Xamarin.Forms; | |
namespace DemoToken | |
{ | |
public partial class MainPage : ContentPage | |
{ | |
public string Codigo | |
{ | |
get => _codigo; | |
set | |
{ | |
_codigo = value; | |
OnPropertyChanged(); | |
} | |
} | |
private string _codigo; | |
public string Segundos | |
{ | |
get => _segundos; | |
set | |
{ | |
_segundos = value; | |
OnPropertyChanged(); | |
} | |
} | |
private string _segundos; | |
private readonly byte[] secretKey; | |
private Totp totp; | |
private Timer timer; | |
public MainPage() | |
{ | |
InitializeComponent(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment