コード例 #1
0
        public override void OnAuthenticationSucceeded(FingerprintManagerCompat.AuthenticationResult result)
        {
            bool isTrusted = false;

            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.
                    isTrusted = true;
                }
                catch (BadPaddingException bpe)
                {
                    // Can't really trust the results.
                    Log.Error(TAG, "Failed to encrypt the data with the generated key." + bpe);
                }
                catch (IllegalBlockSizeException ibse)
                {
                    // Can't really trust the results.
                    Log.Error(TAG, "Failed to encrypt the data with the generated key." + ibse);
                }
            }
            else
            {
                // No cipher used, assume that everything went well and trust the results.
                isTrusted = true;
            }
            if (isTrusted)
            {
                Log.Info("Fingerprint", "Success");
                MessagingCenter.Send <string, string>("FingerprintAuthentication", "Authenticate", "true");
            }
        }
コード例 #2
0
 public override void OnAuthenticationSucceeded(FingerprintManagerCompat.AuthenticationResult result)
 {
     base.OnAuthenticationSucceeded(result);
     Console.WriteLine("OK");
     tcs.SetResult(true);
 }
コード例 #3
0
 public override void OnAuthenticationSucceeded(FingerprintManagerCompat.AuthenticationResult result)
 {
     MessagingCenter.Send("GoodLogin", "GoodLogin");
 }
コード例 #4
0
 public override void OnAuthenticationSucceeded(FingerprintManagerCompat.AuthenticationResult result)
 {
     BiometricAuthService.IsAutSucess = true;
     Toast.MakeText(mainActivity, "Fingerprint Authentication Success", ToastLength.Long).Show();
     MessagingCenter.Send <string>("Auth", "Success");
 }