public async void DecryptClicked (object sender, EventArgs e) { if (!ValidInputs()) { await DisplayAlert ("Missing input", "You must enter plaintext/ciphertext and the key", "OK"); return; } var ps = new PontifexSolitaire (key.Text); ciphertext.Text = ps.Decrypt (plaintext.Text).Pad5() ; Tweet.Code = ciphertext.Text; }
public async void DecryptClicked (object sender, EventArgs e) { if (!ValidInputs()) { await DisplayAlert ("Missing input", "You must enter plaintext/ciphertext and the key", "OK"); return; } var ps = new PontifexSolitaire (key.Text); ciphertext.Text = ps.Decrypt (plaintext.Text).Pad5() ; // was for contest (now closed) http://blog.xamarin.com/xamarin-acquires-petzold/ //Tweet.Code = ciphertext.Text; }
static string TestKeyText (string key, string text) { var ps = new PontifexSolitaire (key); var output = ps.Decrypt (text).Pad5 (); return output; }