static void shuffle(UBytePtr buf,int len)
	{
		int i;
		/*unsigned*/ char t;
	
		if (len == 2) return;
	
		if (len == 6)
		{
			/*unsigned*/ char[] swp=new char[6];
	
			memcpy(swp,buf,6);
			buf.write(0, swp[0]);
			buf.write(1, swp[3]);
			buf.write(2, swp[1]);
			buf.write(3, swp[4]);
			buf.write(4, swp[2]);
			buf.write(5, swp[5]);
			return;
		}
	
		//if (len % 4) exit(1);	/* must not happen */
	
		len /= 2;
	
		for (i = 0;i < len/2;i++)
		{
			t = buf.read(len/2 + i);
			buf.write(len/2 + i, buf.read(len + i));
			buf.write(len + i, t);
		}
	
		shuffle(buf,len);
		shuffle(new UBytePtr(buf,len),len);
	}