<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp_by_API%2FSystem.Security.Cryptography%2FCryptoStream</id>
		<title>Csharp/C Sharp by API/System.Security.Cryptography/CryptoStream - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp_by_API%2FSystem.Security.Cryptography%2FCryptoStream"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Security.Cryptography/CryptoStream&amp;action=history"/>
		<updated>2026-04-30T00:10:59Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Security.Cryptography/CryptoStream&amp;diff=4373&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Security.Cryptography/CryptoStream&amp;diff=4373&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:35Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Security.Cryptography/CryptoStream&amp;diff=4374&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Security.Cryptography/CryptoStream&amp;diff=4374&amp;oldid=prev"/>
				<updated>2010-05-26T12:10:50Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==new CryptoStream==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;  &lt;br /&gt;
/*&lt;br /&gt;
C# Network Programming &lt;br /&gt;
by Richard Blum&lt;br /&gt;
Publisher: Sybex &lt;br /&gt;
ISBN: 0782141765&lt;br /&gt;
*/&lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
using System.Net;&lt;br /&gt;
using System.Net.Sockets;&lt;br /&gt;
using System.Runtime.Serialization;&lt;br /&gt;
using System.Runtime.Serialization.Formatters.Soap;&lt;br /&gt;
using System.Security;&lt;br /&gt;
using System.Security.Cryptography;&lt;br /&gt;
using System.Text;&lt;br /&gt;
public class CryptoDataSender&lt;br /&gt;
{&lt;br /&gt;
   private void SendData(NetworkStream strm, SerialEmployee emp)&lt;br /&gt;
   {&lt;br /&gt;
      IFormatter formatter = new SoapFormatter();&lt;br /&gt;
      MemoryStream memstrm = new MemoryStream();&lt;br /&gt;
      byte[] Key = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16};&lt;br /&gt;
      byte[] IV = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16};&lt;br /&gt;
      TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider();&lt;br /&gt;
      CryptoStream csw = new CryptoStream(memstrm, tdes.CreateEncryptor(Key, IV), CryptoStreamMode.Write);&lt;br /&gt;
      formatter.Serialize(csw, emp);&lt;br /&gt;
      csw.FlushFinalBlock();&lt;br /&gt;
      byte[] data = memstrm.GetBuffer();&lt;br /&gt;
      int memsize = (int)memstrm.Length;&lt;br /&gt;
      byte[] size = BitConverter.GetBytes(memsize);&lt;br /&gt;
      strm.Write(size, 0, 4);&lt;br /&gt;
      strm.Write(data, 0, (int)memsize);&lt;br /&gt;
      strm.Flush();&lt;br /&gt;
      csw.Close();&lt;br /&gt;
      memstrm.Close();&lt;br /&gt;
   }&lt;br /&gt;
   public CryptoDataSender()&lt;br /&gt;
   {&lt;br /&gt;
      SerialEmployee emp1 = new SerialEmployee();&lt;br /&gt;
      SerialEmployee emp2 = new SerialEmployee();&lt;br /&gt;
      emp1.EmployeeID = 1;&lt;br /&gt;
      emp1.LastName = &amp;quot;Blum&amp;quot;;&lt;br /&gt;
      emp1.FirstName = &amp;quot;Katie Jane&amp;quot;;&lt;br /&gt;
      emp1.YearsService = 12;&lt;br /&gt;
      emp1.Salary = 35000.50;&lt;br /&gt;
      emp2.EmployeeID = 2;&lt;br /&gt;
      emp2.LastName = &amp;quot;Blum&amp;quot;;&lt;br /&gt;
      emp2.FirstName = &amp;quot;Jessica&amp;quot;;&lt;br /&gt;
      emp2.YearsService = 9;&lt;br /&gt;
      emp2.Salary = 23700.30;&lt;br /&gt;
      TcpClient client = new TcpClient(&amp;quot;127.0.0.1&amp;quot;, 9050);&lt;br /&gt;
      NetworkStream strm = client.GetStream();&lt;br /&gt;
      SendData(strm, emp1);&lt;br /&gt;
      SendData(strm, emp2);&lt;br /&gt;
      strm.Close();&lt;br /&gt;
      client.Close();&lt;br /&gt;
   }&lt;br /&gt;
   public static void Main()&lt;br /&gt;
   {&lt;br /&gt;
      CryptoDataSender cds = new CryptoDataSender();&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
[Serializable]&lt;br /&gt;
public class SerialEmployee&lt;br /&gt;
{&lt;br /&gt;
   public int EmployeeID;&lt;br /&gt;
   public string LastName;&lt;br /&gt;
   public string FirstName;&lt;br /&gt;
   public int YearsService;&lt;br /&gt;
   public double Salary;&lt;br /&gt;
   public SerialEmployee()&lt;br /&gt;
   {&lt;br /&gt;
      EmployeeID = 0;&lt;br /&gt;
      LastName = null;&lt;br /&gt;
      FirstName = null;&lt;br /&gt;
      YearsService = 0;&lt;br /&gt;
      Salary = 0.0;&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>