static string TestKeyText(string key, string text) { var ps = new PontifexSolitaire(key); var output = ps.Encrypt(text).Pad5(); return(output); }
public async void EncryptClicked(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.Encrypt(plaintext.Text).Pad5(); Tweet.Code = ciphertext.Text; }
public async void EncryptClicked(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.Encrypt(plaintext.Text).Pad5(); // was for contest (now closed) http://blog.xamarin.com/xamarin-acquires-petzold/ //Tweet.Code = ciphertext.Text; }
public QRMakerPage() { this.InitializeComponent(); this.BindingContext = QRMakerPageViewModel.BindingContext; Login data = JsonConvert.DeserializeObject <Login>(Settings.GeneralSettings); Login qr = new Login { Id = data.Id, Name = data.Name, Number = data.Number, Tickets = data.Tickets, }; qrData = JsonConvert.SerializeObject(qr); var ps = new PontifexSolitaire("patitofeo"); qrDataCrypt = ps.Encrypt(data.Id).Pad5(); }