//This code was used by an algorithm DES
pictureBox1.Image = image; MemoryStream ms = new MemoryStream(); image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); byte[] bytes = ms.ToArray(); BitArray bitArray = new BitArray(bytes); for (var x = 5000; x < 9000; x++) textBox1.Text += Convert.ToInt16(bitArray[x]); MD5CryptoServiceProvider mds = new MD5CryptoServiceProvider(); //UTF8Encoding utf8 = new UTF8Encoding(); TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider(); //tdes.Key = mds.ComputeHash(utf8.GetBytes(textBox1.Text)); tdes.Mode = CipherMode.CBC; tdes.Padding = PaddingMode.PKCS7; ICryptoTransform tram = tdes.CreateEncryptor(); encrypted = (tram.TransformFinalBlock(bytes, 0, (bytes.Length))); //MessageBox.Show(Convert.ToString(encrypted)); File.WriteAllBytes("E:/u.jpg", encrypted);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)