• 大小: 95KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-17
  • 语言: 其他
  • 标签:

资源简介

des加密和lsb算法的信息隐藏程序,课设时做的,希望对大家有用处

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Security.Cryptography;
using System.IO;
using System.Drawing.Imaging;

namespace WindowsFormsApplication2
{
   
    public partial class Form1 : Form


    {
        private long _maxInfoSize = 0;
        string sFileIn sFileOut;
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender EventArgs e)
        {
           
        }

        private void textBox2_TextChanged(object sender EventArgs e)
        {

        }

        private void textBox1_TextChanged(object sender EventArgs e)
        {

        }

        private void button2_Click(object sender EventArgs e)
        {

            sFileIn = this.textBox1.Text;
            sFileOut = this.textBox2.Text;
            TripleDES_ rsa1 = new TripleDES_(“destroyer)(*&^%$#@!“);

            if (this.radioButton1.Checked)
            {
                rsa1.Encrypt(sFileIn sFileOut);
            }
            else
            {
                rsa1.Decrypt(sFileIn sFileOut);
            }
            this.textBox3.Text = “OK!“;




        }

        private void label1_Click(object sender EventArgs e)
        {

        }

       

        private void textBox3_TextChanged(object sender EventArgs e)
        {

        }

        private void tabPage1_Click(object sender EventArgs e)
        {

        }

        private void button3_Click(object sender EventArgs e)
        {
            OpenFileDialog filedlg = new OpenFileDialog();
            filedlg.Filter = “24位位图 (*.bmp)|*.bmp“;
            if (filedlg.ShowDialog() == DialogResult.OK)
            {
                FileStream fs = new FileStream(filedlg.FileName FileMode.Open FileAccess.Read);
                using (Bitmap bmp = new Bitmap(fs))
                {
                    if (bmp.PixelFormat != PixelFormat.Format24bppRgb)
                    {
                        MessageBox.Show(“选择的图片并不是24位位图!“ “LSB“
                                        MessageBoxButtons.OK MessageBoxIcon.Information);
                    }
                    else
                    {
                        _maxInfoSize = (fs.Length - 54) / 4 - 3;
                        textBox4.Text = filedlg.FileName;
                        label4.Text = string.Format(“{0:N0} 字节“ fs.Length);
                        label5.Text = string.Format(“{0:N0} 字节“ _maxInfoSize);
                    }
                }
                fs.Close();
            }
        }

        private void button4_Click(object sender EventArgs e)
        {
            OpenFileDialog filedlg = new OpenFileDialog();
            filedlg.Filter = “所有文件 (*.*)|*.*“;
          

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-01-06 16:36  DES+LSB\
     目录           0  2016-01-06 16:36  DES+LSB\.vs\
     目录           0  2016-01-06 16:36  DES+LSB\.vs\WindowsFormsApplication2\
     目录           0  2016-01-06 16:36  DES+LSB\.vs\WindowsFormsApplication2\v14\
     文件       53248  2015-12-18 12:56  DES+LSB\.vs\WindowsFormsApplication2\v14\.suo
     目录           0  2016-01-06 16:36  DES+LSB\WindowsFormsApplication2\
     文件        1041  2015-06-28 11:22  DES+LSB\WindowsFormsApplication2.sln
     文件       54784  2015-06-28 18:38  DES+LSB\WindowsFormsApplication2.v12.suo
     文件         187  2015-06-28 11:22  DES+LSB\WindowsFormsApplication2\App.config
     目录           0  2016-01-06 16:36  DES+LSB\WindowsFormsApplication2\bin\
     目录           0  2016-01-06 16:36  DES+LSB\WindowsFormsApplication2\bin\Debug\
     文件       24064  2015-10-27 22:31  DES+LSB\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.exe
     文件         187  2015-06-28 11:22  DES+LSB\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.exe.config
     文件       46592  2015-10-27 22:31  DES+LSB\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.pdb
     文件       22696  2016-01-05 11:52  DES+LSB\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.vshost.exe
     文件         187  2015-06-28 11:22  DES+LSB\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.vshost.exe.config
     文件         490  2015-07-10 19:01  DES+LSB\WindowsFormsApplication2\bin\Debug\WindowsFormsApplication2.vshost.exe.manifest
     目录           0  2015-06-28 14:19  DES+LSB\WindowsFormsApplication2\bin\Release\
     文件        9235  2015-06-28 18:35  DES+LSB\WindowsFormsApplication2\Form1.cs
     文件       19544  2015-06-28 18:35  DES+LSB\WindowsFormsApplication2\Form1.Designer.cs
     文件        5993  2015-06-28 18:35  DES+LSB\WindowsFormsApplication2\Form1.resx
     文件        6337  2015-06-28 14:53  DES+LSB\WindowsFormsApplication2\LSBDecrypt.cs
     文件        6855  2015-06-28 15:33  DES+LSB\WindowsFormsApplication2\LSBEncrypt.cs
     目录           0  2016-01-06 16:36  DES+LSB\WindowsFormsApplication2\obj\
     目录           0  2016-01-06 16:36  DES+LSB\WindowsFormsApplication2\obj\Debug\
     文件        1612  2015-06-28 15:46  DES+LSB\WindowsFormsApplication2\obj\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        7109  2015-10-27 22:30  DES+LSB\WindowsFormsApplication2\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件           0  2015-06-28 11:22  DES+LSB\WindowsFormsApplication2\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
     文件           0  2015-06-28 11:22  DES+LSB\WindowsFormsApplication2\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
     文件           0  2015-06-28 11:22  DES+LSB\WindowsFormsApplication2\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
     目录           0  2015-06-28 11:22  DES+LSB\WindowsFormsApplication2\obj\Debug\TempPE\
............此处省略16个文件信息

评论

共有 条评论

相关资源