Esempio n. 1
0
        private void Button5_Click(object sender, EventArgs e)
        {
            // read file path from TextBox3.Text
            var             FileStream = new FileStream(path: TextBox3.Text, mode: FileMode.Open, access: FileAccess.Read);
            RijndaelManaged AES        = new RijndaelManaged();
            SHA256Cng       SHA256     = new SHA256Cng();

            // read key from TextBox4.Text
            AES.Key  = SHA256.ComputeHash(Encoding.ASCII.GetBytes(TextBox4.Text));
            AES.Mode = CipherMode.ECB;


            // cryptostream starts here
            var cryptoStream = new CryptoStream(FileStream, AES.CreateDecryptor(), CryptoStreamMode.Read);

            // reading decrypted cryptostream and saves into video.mp4
            VlcControl1.Play(cryptoStream);
        }
Esempio n. 2
0
 private void Button1_Click(object sender, EventArgs e)
 {
     VlcControl1.Stop();
 }