public void encrypt(InputStream in, OutputStream out)
	throws IOException
    {
	byte inbuf[] = new byte[8];
	byte outbuf[] = new byte[8];
	boolean done = false;
	while (!done) {
	    int n = readn(in, inbuf, 8);
	    if (n < 8) {
		done = true;
		int m = n;
		while (n < 7)
		    inbuf[n++] = 0;
		inbuf[n++] = (byte) (m & 0xff);
	    }
	    DES.des_ecb_encrypt(inbuf, outbuf, schedule, true);
	    out.write(outbuf, 0, 8);
	}
    }