How can you protect/encrypt your Java classes?

后端 未结 5 1630
北荒
北荒 2020-12-10 10:12

Some time ago, in my work I needed to protect some classes against other people to read the code. For that purpose, I created a EncryptedClassLoader, that loaded previously

5条回答
  •  暖寄归人
    2020-12-10 10:49

    Encryption doesn't add much safety to obfuscation. Anyone that is able to run your program will also be able to dump the decypted bytecode to disk. I assume this is why encrypting the bytecode isn't very common, where signing it is for example.

    If you do want to encrypt your bytecode, make sure you also obfuscate it and I think the method you are currently using would work just fine without adding any frameworks or libraries.

提交回复
热议问题