private void btnTest_Click(object sender, EventArgs e) { TwoFactorAuthenticator tfA = new TwoFactorAuthenticator(); var result = tfA.ValidateTwoFactorPIN(txtSecretKey.Text, this.txtCode.Text); MessageBox.Show(result ? "Validated!" : "Incorrect", "Result"); }
public Boolean ValidateTwoFactorPIN(String pin) { TwoFactorAuthenticator tfa = new TwoFactorAuthenticator(); return(tfa.ValidateTwoFactorPIN(AuthenticationCode, pin)); }