0

Is there a way to obfuscate a resource directory without the use of an outside plugin? I need to prevent users from being able to read a few xml files. Even if there's a way to export the files obfuscated into the JAR file.

I have searched, and have seen 3rd party tools (such as ProGuard). However, I am looking for a method that doesn't involve 3rd party software.

user2970916
  • 1,146
  • 3
  • 15
  • 37
  • At the risk of sounding snarky, the best you can hope for is to make life difficult for honest users. Presumably your code will need to be able to read the XML? If the code can read the XML, then all your users need do is trace the code and they can read the XML as well. – Chris Parker Aug 30 '17 at 15:38

1 Answers1

0

You could use the javax.crypto libraries and a symmetric (two way) algorithm like AES. See using-aes-256-and-128-symmetric-key-encryption

lance-java
  • 25,497
  • 4
  • 59
  • 101