private void HashTextMethod(object obj) { if (!string.IsNullOrEmpty(ClearHash1) && !string.IsNullOrEmpty(ClearHash2)) { var isMatch = CryptoBLL.HashValueMatch(ClearHash1, ClearHash2); if (isMatch.Success) { HashMatchMessage = string.Empty; } else { HashMatchMessage = "The entries do not match"; } } }
private void EncryptTextMethod(object obj) { if (string.IsNullOrEmpty(EncryptedText)) { if (!string.IsNullOrEmpty(ClearText)) { var result = CryptoBLL.EncryptText(ClearText); if (result.Error == null) { EncryptedText = result.Response; ClearText = string.Empty; } else { Device.BeginInvokeOnMainThread(() => { DialogPrompt.ShowMessage(new Prompt() { Title = "Error", Message = result.Error.Message }); }); } } } else { var result = CryptoBLL.DecryptText(EncryptedText); if (result.Error == null) { ClearText = result.Response; EncryptedText = string.Empty; } else { Device.BeginInvokeOnMainThread(() => { DialogPrompt.ShowMessage(new Prompt() { Title = "Error", Message = result.Error.Message }); }); } } }