Ejemplo n.º 1
0
        private void btnMD5EncryptFile_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog();

            dialog.Multiselect = false;
            dialog.Filter      = "所有文件(*.*)|*.*";
            dialog.Title       = "请选择文件";

            if ((bool)dialog.ShowDialog())
            {
                string fileName    = dialog.FileName;
                string decryptText = MD5Encrypt.GetEncryptFileByMD5(fileName);

                txtBxEncryptText.Text = fileName;
                txtBxDecryptText.Text = decryptText;
            }
        }