Esempio n. 1
0
        public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult result)
        {
            if (result.CryptoObject.Cipher != null)
            {
                try
                {
                    // Calling DoFinal on the Cipher ensures that the encryption worked.
                    byte[] doFinalResult = result.CryptoObject.Cipher.DoFinal(SECRET_BYTES);

                    // No errors occurred, trust the results.
                }
                catch (BadPaddingException bpe)
                {
                    // Can't really trust the results.
                    LogCommon.Error(bpe);
                }
                catch (IllegalBlockSizeException ibse)
                {
                    // Can't really trust the results.
                    LogCommon.Error(ibse);
                }
            }
            else
            {
                // No cipher used, assume that everything went well and trust the results.
            }
        }
Esempio n. 2
0
 public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult result)
 {
     if (result.CryptoObject.Cipher != null)
     {
         try
         {
             byte[] doFinalResult = result.CryptoObject.Cipher.DoFinal(SECRET_BYTES);
             _currentActivity.OnAuthenticationSucceeded();
         }
         catch (BadPaddingException bpe)
         {
             _currentActivity.OnAuthenticationFailed();
             Log.Error(TAG, "Failed to encrypt the data with the generated key." + bpe);
         }
         catch (IllegalBlockSizeException ibse)
         {
             _currentActivity.OnAuthenticationFailed();
             Log.Error(TAG, "Failed to encrypt the data with the generated key." + ibse);
         }
     }
     else
     {
         _currentActivity.OnAuthenticationSucceeded();
     }
 }
Esempio n. 3
0
        public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult result)
        {
            FModel fModel = new FModel();

            fModel.flag = true;
            Toast.MakeText(mainActivity, "Fingerprint Authentication Successful!", ToastLength.Long).Show();
            //MarkAttendancePage.FPNavigate();
        }
        // https://developer.android.com/reference/android/hardware/fingerprint/FingerprintManager.AuthenticationCallback.html
        public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult res)
        {
            base.OnAuthenticationSucceeded(res);
            var result = new FingerprintAuthenticationResult {
                Status = FingerprintAuthenticationResultStatus.Succeeded
            };

            SetResultSafe(result);
        }
Esempio n. 5
0
 public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult result)
 {
     mErrorTextView.RemoveCallbacks(ResetErrorTextRunnable);
     mIcon.SetImageResource(Resource.Drawable.ic_fingerprint_success);
     mErrorTextView.SetTextColor(mErrorTextView.Resources.GetColor(Resource.Color.success_color, null));
     mErrorTextView.Text = mErrorTextView.Resources.GetString(Resource.String.fingerprint_success);
     mIcon.PostDelayed(() => {
         mCallback.OnAuthenticated();
     }, SUCCESS_DELAY_MILLIS);
 }
Esempio n. 6
0
        public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult result)
        {
            user.UserBalance = user.UserBalance - transaction.TransactionAmount;
            Toast.MakeText(mainActivity, user.UserBalance.ToString(), ToastLength.Short).Show();
            Intent i = new Intent(mainActivity, typeof(BiometricResult));

            i.PutExtra("transactionObject", JsonConvert.SerializeObject(transaction));
            i.PutExtra("user", JsonConvert.SerializeObject(user));
            mainActivity.StartActivity(i);
        }
 public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult result)
 {
     mainActivity.StartActivity(new Intent(mainActivity, typeof(HomeActivity)));
 }
 public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult result)
 {
     _callback.OnFingerprintAuthSucceeded();
 }
Esempio n. 9
0
 /// <summary>
 /// To be added.
 /// </summary>
 /// <param name="result"></param>
 public AuthenticationSucceededEventArgs(FingerprintManager.AuthenticationResult result) => Result = result;
Esempio n. 10
0
 public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult result)
 {
     Toast.MakeText(_amprenta, "Authentication succeeded!", ToastLength.Short).Show();
 }
        public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult result)
        {
            var prefs = PreferenceManager.GetDefaultSharedPreferences(Application.Context);

            Toast.MakeText(_context, _fingerprintDec.DecryptStored(_prefKey), ToastLength.Long).Show();
        }
 public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult result)
 {
     _fingerprintEnc.StoreEncrypted("some töst data", _prefKey, Application.Context);
 }
Esempio n. 13
0
 public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult result)
 {
     Toast.MakeText(mainActivity, "Autenticacion Exitosa", ToastLength.Long).Show();
     mainActivity.StartActivity(new Intent(mainActivity, typeof(ConfirmacionEnroladoActivity)));
 }
 public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult result)
 {
     base.OnAuthenticationSucceeded(result);
     this.scanEval.TrySetResult(true);
 }
 public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult result)
 {
     Toast.MakeText(_context, _context.GetString(Resource.String.fingerprintSuccess), ToastLength.Short).Show();
     _context.StartActivity(new Intent(_context, typeof(HomeActivity)));
 }
 public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult result)
 {
     Kp2aLog.Log("FP: OnAuthenticationSucceeded ");
     StopListening();
     _callback.OnAuthenticationSucceeded(result);
 }
 public override void OnAuthenticationSucceeded(FingerprintManager.AuthenticationResult result) =>
 FingerprintAuth?.Invoke(this,
                         new FingerprintAuthEventArgs {
     ErrorsCount = _error = 0, Status = true, Result = result
 });