public void decrypt(InputStream in, OutputStream out)
	throws IOException
    {
	byte inbuf[] = new byte[8];
	byte outbuf[] = new byte[8];
	byte tmpbuf[] = new byte[8];
	byte tmp[];
	boolean done = false;
	int n = readn(in, inbuf, 8);
	while (n == 8) {
	    tmp = tmpbuf;
	    tmpbuf = outbuf;
	    outbuf = tmp;
	    n = readn(in, inbuf, 8);
	    if (n < 8)
		break;
	    DES.des_ecb_encrypt(inbuf, tmpbuf, schedule, false);
	    out.write(outbuf, 0, 8);
	}
	if (n > 0)
	    throw new IOException("input file length wrong");
	int m = outbuf[7];
        if (m > 0 && m <= 7)
            out.write(outbuf, 0, outbuf[7]);
        if (m < 0 || m > 7)
	    throw new IOException("input file format error");
    }