public string Encrypt(string sPath, string sKey, string sText) { string sReturn = ""; try { ScpApiLib.ScpApi lib = new ScpApiLib.ScpApi(); sReturn = lib.Encrypt(sPath, sKey, sText); } catch (Exception) { } return(sReturn); }
private void btnEnc_Click(object sender, EventArgs e) { try { ScpApiLib.ScpApi lib = new ScpApiLib.ScpApi(); txtEnc.Text = lib.Encrypt(txtPath.Text, txtKey.Text, txtText.Text); txtDec.Text = lib.Decrypt(txtPath.Text, txtKey.Text, txtEnc.Text); } catch (Exception ex) { MessageBox.Show(ex.Message); } }