小编Nik*_*Nik的帖子

填充无效,无法删除.on cryptoStream.FlushFinalBlock(); 在Decrypt方法中我得到了这个例外

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

namespace GUISimpleTCPClient
{

    public partial class GUISimpleTCPClient : Form
    {

        TcpClient client=null;
        NetworkStream stream;
        StreamReader reader;
        StreamWriter writer;
        public GUISimpleTCPClient()
        {
            InitializeComponent();
        }

        private void Connect_Click(object sender, EventArgs e)
        {
            try
            {
                client=new TcpClient(ipAddress.Text,Convert.ToInt32(port.Text));
                listBox1.Items.Add("Connected to Server");
                stream = client.GetStream();
                reader = new StreamReader(stream);
                writer = new StreamWriter(stream);
                string msg = reader.ReadLine();
                listBox1.Items.Add("Recieved form …
Run Code Online (Sandbox Code Playgroud)

c#

-4
推荐指数
1
解决办法
3846
查看次数

标签 统计

c# ×1