The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Salil V Gangal

Posted by Hiding/Encrypting strings in Java's .class files on July 08, 2001 at 11:58 AM


Those who are familier with UNIX command 'strings' will know that this command can display the strings out of binary files. And the .class file is one such binary file.

What are the methods of hiding/encrypting the strings in the .class file so that UNIX 'strings' command cannnot find them ? (Please note I'm inquiring about hiding/encrypting strings within a .class file, as against general hiding/encryption in Java language.)

Let me clarify my question with an example.

Say if I code a Java program and want to distribute the .class file. This .class file most likely will contain some verbage which for things like 'Copyrite: Salil V Gangal', 'Version: 1.0', and so on. I don't want anyone finding these strings within the .class file and then changing them.

So what are the methods by which such a task is done ?

Salil V Gangal


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us