Java class encryption solution.