Hello, I understand your concept but I'm not sure that in which platform your app will run Ex. Windows, Android, IOS.
Platform actually doesn't matter and there is many way to achieve your goal.
1. Create a different key for every user and provide them then verify it on the server.
2. You will have two key one public and another private, you will use the private key to issue a license to a new user and the user will get a license and a public key to verify the license.
Note. Licensing a product is never so easy and no one create a 100% secure license for product as you can see 70% windows users are using cracked windows. :)
I'm new here at Freelancer.com but I'm not new to software development, I also work at Upwork.
Hope hear you from soon , Thanks.