From 36925770d0089190511312303317f0ca555acbcd Mon Sep 17 00:00:00 2001 From: kspearrin Date: Sun, 15 Apr 2018 21:45:05 -0400 Subject: [PATCH] show ut8 password alert --- src/App/Pages/LoginPage.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/App/Pages/LoginPage.cs b/src/App/Pages/LoginPage.cs index 832f81aba..b76a04b97 100644 --- a/src/App/Pages/LoginPage.cs +++ b/src/App/Pages/LoginPage.cs @@ -179,6 +179,16 @@ namespace Bit.App.Pages return; } + var passwordUtf8 = string.Empty; + var utf8 = System.Text.Encoding.UTF8; + var utfBytes = utf8.GetBytes(PasswordCell.Entry.Text); + foreach(var b in utfBytes) + { + passwordUtf8 += string.Format(@"\x{0:X2}", b); + } + await DisplayAlert("UTF8 Password Is", passwordUtf8, AppResources.Ok); + _deviceActionService.CopyToClipboard(PasswordCell.Entry.Text + " = " + passwordUtf8); + await _deviceActionService.ShowLoadingAsync(AppResources.LoggingIn); var result = await _authService.TokenPostAsync(EmailCell.Entry.Text, PasswordCell.Entry.Text); await _deviceActionService.HideLoadingAsync();