91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.9MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2023-11-16
  • 語言: C#
  • 標簽: LSB??隱藏??讀取??

資源簡介

網絡安全LSB算法 采用C# 實現文字的隱藏和讀取 直接用visual studio 打開 .sln 文件即可

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.IO;
using?System.Linq;
using?System.Security.Cryptography;
using?System.Text;
using?System.Threading.Tasks;

namespace?LSB算法CS實現
{
????class?DES
????{
?????????///
?????????///?DES加密
?????????///

?????????///8-15bytes明文
?????????///8bytes密鈅
?????????///32bytes密文
?????????public?static?string?DESEncrypt(string?content?string?key)
?????????{
?????????????byte[]?data?=?Encoding.UTF8.GetBytes(content);
?????????????DESCryptoServiceProvider?DES?=?new?DESCryptoServiceProvider();
?????????????DES.Key?=?UTF8Encoding.UTF8.GetBytes(key);
?????????????DES.IV?=?UTF8Encoding.UTF8.GetBytes(key);
?????????????MemoryStream?ms?=?new?MemoryStream();??//內存流。
?????????????CryptoStream?cs?=?new?CryptoStream(ms?DES.CreateEncryptor()?CryptoStreamMode.Write);//內存流創建為加密轉換流
?????????????cs.Write(data?0?data.Length);
?????????????cs.FlushFinalBlock();??//用緩沖區的當前狀態更新基礎數據源或儲存庫,隨后清除緩
?????????????StringBuilder?ret?=?new?StringBuilder();
?????????????foreach?(byte?b?in?ms.ToArray())
?????????????{
?????????????????ret.AppendFormat(“{0:X2}“?b);
?????????????}
?????????????return?ret.ToString();
?????????}
?
?????????///
?????????///?DES解密
?????????///

?????????///32bytes密文
?????????///8bytes密鈅
?????????///8-15bytes明文
?????????public?static?string?DESDecrypt(string?content?string?key)
?????????{
?????????????DESCryptoServiceProvider?des?=?new?DESCryptoServiceProvider();
?
?????????????//Put??the??input??string??into??the??byte??array??
?????????????byte[]?inputByteArray?=?new?byte[content.Length?/?2];
?????????????for?(int?x?=?0;?x??????????????{
?????????????????int?i?=?Convert.ToInt32(content.Substring(x?2)?16);
?????????????????inputByteArray[x?/?2]?=?(byte)i;
?????????????}
?
?????????????des.Key?=?UTF8Encoding.UTF8.GetBytes(key);
?????????????des.IV?=?UTF8Encoding.UTF8.GetBytes(key);
?????????????MemoryStream?ms?=?new?MemoryStream();
?????????????CryptoStream?cs?=?new?CryptoStream(ms?des.CreateDecryptor()?CryptoStreamMode.Write);
?????????????//Flush??the??data??through??the??crypto??stream??into??the??memory??stream??
?????????????cs.Write(inputByteArray?0?inputByteArray.Length);
?????????????cs.FlushFinalBlock();
?????????????//建立StringBuild對象,CreateDecrypt使用的是流對象,必須把解密后的文本變成流對象??
?????????????StringBuilder?ret?=?new?StringBuilder();
?
?????????????return?System.Text.Encoding.UTF8.GetString(ms.ToArray());
?????????}
?????}
}


?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-01-07?08:12??lsb\
?????目錄???????????0??2013-01-07?08:29??lsb\lsb\
?????文件????????2878??2013-01-07?08:31??lsb\lsb\DES.cs
?????文件?????????811??2013-01-07?08:13??lsb\lsb\Form1.cs
?????文件????????4296??2013-01-07?08:13??lsb\lsb\Form1.designer.cs
?????文件???????95829??2013-01-07?08:13??lsb\lsb\Form1.resx
?????文件????????6058??2013-01-07?09:46??lsb\lsb\LSB_embed.cs
?????文件???????11176??2013-01-07?09:08??lsb\lsb\LSB_embed.designer.cs
?????文件???????62834??2013-01-07?09:08??lsb\lsb\LSB_embed.resx
?????文件????????3266??2013-01-07?09:46??lsb\lsb\LSB_Extraction.cs
?????文件???????10004??2013-01-07?09:08??lsb\lsb\LSB_Extraction.designer.cs
?????文件??????135602??2013-01-07?09:08??lsb\lsb\LSB_Extraction.resx
?????文件????????4291??2013-01-07?08:13??lsb\lsb\LSB算法CS實現.csproj
?????文件?????????476??2013-01-07?08:13??lsb\lsb\Program.cs
?????目錄???????????0??2013-01-07?08:12??lsb\lsb\Properties\
?????文件????????1398??2013-01-07?08:12??lsb\lsb\Properties\AssemblyInfo.cs
?????文件????????2856??2013-01-07?08:12??lsb\lsb\Properties\Resources.Designer.cs
?????文件????????5612??2013-01-07?08:12??lsb\lsb\Properties\Resources.resx
?????文件????????1088??2013-01-07?08:12??lsb\lsb\Properties\Settings.Designer.cs
?????文件?????????249??2013-01-07?08:12??lsb\lsb\Properties\Settings.settings
?????文件????????3502??2013-01-07?09:47??lsb\lsb\SevenZipUtil.cs
?????目錄???????????0??2013-01-07?08:13??lsb\lsb\bin\
?????目錄???????????0??2013-01-07?08:25??lsb\lsb\bin\Debug\
?????文件?????1129472??2010-08-26?21:13??lsb\lsb\bin\Debug\7z.dll
?????文件?????1484800??2010-08-26?21:11??lsb\lsb\bin\Debug\7z64.dll
?????文件??????151040??2012-12-26?09:12??lsb\lsb\bin\Debug\SevenZipSharp.dll
?????文件??????205824??2013-01-07?09:47??lsb\lsb\bin\Debug\lsb.exe
?????文件???????52736??2013-01-07?09:47??lsb\lsb\bin\Debug\lsb.pdb
?????文件???????11600??2013-01-07?09:46??lsb\lsb\bin\Debug\lsb.vshost.exe
?????目錄???????????0??2013-01-07?09:48??lsb\lsb\bin\Release\
?????文件????????4663??2013-01-07?08:31??lsb\lsb\lsb.csproj
............此處省略18個文件信息

評論

共有 條評論