I have a Java application for corporations that will be activated by a paid licence.
The application will use a public key to decrypt a license file that was encrypted with a private key. (And/or, the application will encrypt some data and submit it to a web service where it will be decrypted with the private key on the server).
Either way, the application needs to have the public key.
I'm thinking about hard-coding the contents of the public key file in a Java class and reading it from there. Also, I am using an obfuscator (Allatori) that does string encryption so the hard-coded public key string would be scrambled by the obfuscated and so won't easily readable using a decompiler, so I see that as an advantage.
But is there a good reason why I should not hard-code the public key and instead deliver it as a file in the class path?
Please give me some advice because I'm new at this and could use some advice, thanks!