public static byte[] encrypt(byte[] in,byte[] key){
		K = expandKey(key);
		int lenght=0;
		byte[] padding = new byte[1];
		int i;
		lenght = 16 - in.length % 16;				
		padding = new byte[lenght];					
		padding[0] = (byte) 0x80;
		
		for (i = 1; i < lenght; i++)				
			padding[i] = 0;

		byte[] tmp = new byte[in.length + lenght];		
		byte[] bloc = new byte[16];	
		
		int count = 0;

		for (i = 0; i < in.length + lenght; i++) {
			if (i > 0 && i % 16 == 0) {
				bloc = encryptBloc(bloc);
				System.arraycopy(bloc, 0, tmp, i - 16, bloc.length);
			}
			if (i < in.length)
				bloc[i % 16] = in[i];
			else{														
				bloc[i % 16] = padding[count % 16];
				count++;
			}
		}
		if(bloc.length == 16){
			bloc = encryptBloc(bloc);
			System.arraycopy(bloc, 0, tmp, i - 16, bloc.length);
		}
		
		return tmp;
	}