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

📄 decryptinputstream.java

📁 加密解密程序,实现了加密解密功能,无解密密码
💻 JAVA
字号:
import java.io.*;

public class DecryptInputStream  extends FilterInputStream
{
	 public DecryptInputStream(InputStream in)
	{
	  super(in);
	}
	
	
	public byte Decrypt(byte b)
	{
	  int  key=240; //  11110000
	  return (byte)(b^key);
	} 
	
	public int dread() throws IOException
	{
	   int r=super.read();
	   if(r==-1)
	      return (-1);
	   else  return (int)this.Decrypt((byte)r);
	      
	}
	
	public int dread(byte[] b) throws IOException
	{ 
	  int result;
	  result=super.read(b);
	  for(int i=0;i<b.length;i++)
	     b[i]=this.Decrypt(b[i]);
	     
	  return result;
	}
	
	public int dread(byte[] b,int off,int len) throws IOException
	{  
	   int result;
	  result=super.read(b,off,len);
	  for(int i=0;i<b.length;i++)
	     b[i]=this.Decrypt(b[i]);
	  return result;
	}
}

⌨️ 快捷键说明

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