Hi,
I have write a java application to mix characters of the string, and save in the encrypted String.

Like that (first character in 8'th ...):
B1 B2 B3 B4 B5 B6 B7 B8 B9
B8 B1 B3 B4 B9 B2 B5 B7 B6

How to do the same thing for a text file?
(get 9 characters encrypt and write in other file)

Java Code:
public class Det6enc
{	
	
	public static String mix(String str)
	{
		String enc = "";
		char[] c = new char[9];
		char[] b = new char[9];
		
		int numro = ((str.length()-(str.length())%9));
	
		for(int i=0; i<numro; i=i+9)
		{
			for(int j=0; j<9; j++)
			{
				b[j] = str.charAt(j+i);
			}
			c[0] = b[1];	c[1] = b[5];	c[2] = b[2];	
			c[3] = b[3];	c[4] = b[6];	c[5] = b[8];	
			c[6] = b[7];	c[7] = b[0];	c[8] = b[4];
			
			
			for(int k=0; k<9; k++)
			{
				enc = enc + c[k];
			}	
		}
		for(int i=0; i<str.length()-numro; i++)
		{
			enc = enc + str.charAt((str.length()-(str.length())%9)+i);
		}
		
		return enc;	
	}
	
	public static void main (String[] args) 
	{
		String str = "ARTAN POTERA";
		System.out.println (mix(str));
    }	
}