I am trying to add software licensing to my software, which I am planning to sell (which means if the license if correct, give access to the software. Else, break the access). I don't have any servers, so unable to connect to them. I am going to use "Kagi" service to sell my software ( I don't like to use their server support for licensing too, because it is time for me to get some break ). So, I decided to use client side validation. Anyway, I am in a confuse of how to generate the license(the license algorithm) and how to validate it (according to license algorithm). I can do it in my way, but don't like to mess with this security issue, so decided to take your expertise help. Please tell me/show me/give examples for how to create this License Generator, and Validator. And, if you are posting an example with an algorithm, please be kind enough to explain it if you think it is complex. Because then only I can create one of my own
Are you better than me? Then please show me my mistakes..
If using one of the existing solutions (as mentioned by Tim) is not an option for you, you can use RSA to implement a simple and effective licensing mechanism. A good article that explains the background and details is https://build-system.fman.io/generating-license-keys.
I would also recommend obfuscating your Java code, because Java is very easy to decompile.
As for obfuscated code, I laugh. Back before the DMCA was enacted, I needed a feature for my C compiler that Microsoft's MASM couldn't handle. So I disassembled MASM and patched code into it to give it that feature. MASM wasn't merely obfuscated, it contained no symbolic information whatsoever. Didn't slow me down.
Locks, as they say, are for honest people. I've always counseled paranoid people that if they make their products sufficiently annoying then people WILL crack any protection scheme if only for the challenge of doing so. In the mean time, you've probably crippled the product for those who actually paid for it and you've spent time on "copy protection" that could have been spent on a better product. There are always those who think it's cool to steal, but a good product at a fair price, people will pay for. Consider the fact that Red Hat not only sells a free enterprise OS system, they even provide an even freer one (CentOS), and they're a billion-dollar corporation.
Besides, this thread is 6 years old. In the IT industry, likely most of the particpants have passed on to other employers twice now, so they wouldn't care anymore.
An IDE is no substitute for an Intelligent Developer.