Example #1
0
 private void btnEncode_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(tsbRarPath.Text))
     {
         FileEncypt.EncryptFile(tsbRarPath.Text, tsbRarPath.Text + "x", ConstUtil.FILE_ENCRYPT_KEY);
         MessageBox.Show("加密成功!!!");
     }
     else
     {
         MessageBox.Show("请先选择需要加密的文件");
     }
 }
Example #2
0
 private void btnDecode_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(tsbRarPath.Text))
     {
         FileEncypt.DecryptFile(tsbRarPath.Text, tsbRarPath.Text.TrimEnd('x'), ConstUtil.FILE_ENCRYPT_KEY);
         MessageBox.Show("解密成功!!!");
     }
     else
     {
         MessageBox.Show("请先选择需要解密的文件");
     }
 }