I need to add a license to my application to limit time & device that my app. can be used.
So I thought to store HDD and/or NIC serial numbers and expire date in my license file.
Now how can I protect my license in a way that:
- My application be able to decrypt it and read & check the expire date and serials
- User shouldn't be able to create a license file for himself.
Can I use public/private key encryption to achieve this?
If I can use public/private key encryption can the user that has private key (for decryption) use that private key for encryption (making a license manually using the private key that be able to decrypt using that private key) or only the pubic key can encrypt in a way that private key decrypt it?
Is there a better solution?