⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mythread1.java

📁 应用公钥加密体制的代表算法RSA 应用对称加密算法DES 应用散列算法MD5计算消息摘要 数字签名并验证
💻 JAVA
字号:
/* * mythread1.java * * Created on 2007年12月4日, 下午6:57 * * To change this template, choose Tools | Template Manager * and open the template in the editor. */package b;import java.net.*;import java.io.*;import javax.swing.JOptionPane;import java.awt.*;/** * * @author guowen */public class mythread1 extends Thread {           public mythread1() {    }        public  void run(){       try{           ServerSocket ss=new ServerSocket(6123);           Socket s=ss.accept();           InputStream ips=s.getInputStream();           OutputStream ops=s.getOutputStream();                      int num=ips.available();           byte[] buf=new byte[num];           int len=ips.read(buf);                      FileOutputStream fos=new FileOutputStream("RSA_ENCRYPT.txt");           fos.write(buf,0,len);           JOptionPane.showMessageDialog(new Frame(),"注意查收文件!!");           fos.close();           ops.close();           ips.close();                }catch(Exception e){           System.out.println(e);       }            }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -