public String encode(String plain)
	 {
		int period=key.length();
		String plain_u=plain.toUpperCase();
		if(plain_u.length()%2!=0)
		{
			plain_u+="X";
		}
		char[][] block=Incomp_column.build_block(plain_u, -1,period*2, 0);
		StringBuilder sb=new StringBuilder();
		for(int i=0;i<block.length;i++)
		{
			for(int j=0;j<block[0].length;j+=2)
			{
				if(block[i][j]=='\0')
				{
					break;
				}
				sb.append(get_pair_ct(block[i][j],block[i][j+1],key.charAt(j/2)));
			}
		}
		
		return sb.toString();
	 }