{"repo":"hyperboloide/lk","free":true,"listed":false,"github":"https://github.com/hyperboloide/lk","clone":"git clone https://github.com/hyperboloide/lk.git","description":"Simple licensing library for golang.","language":"Go","stars":422,"topics":["golang","sign","crypto"],"license":"MIT","category":"dev-tools","readme_excerpt":"license-key A simple licensing library in Golang, that generates license files containing arbitrary data (ex: user email, end date...) that you can further validate if you want. The license files are signed with the: Elliptic Curve Digital Signature Algorithm (using elliptic.P384 ) The license file can be marshalled in an easy to distribute format (ex: base32 encoded strings) Note that this implementation is quite basic and that in no way it could prevent someone to hack your software. The goal of this project is only to provide a convenient way for software publishers to generate license keys and distribute them without too much hassle for the user. How does it works? 1. Generate a private key (and keep it secure). 2. Transform the data you want to provide (end date, user email...) to a byte array (using json or gob for example). 3. The library takes the data and create a cryptographically signed hash that is appended to the data. 4. Convert the result to a Base64/Base32/Hex string and send it to the end user: this is the license. 5. when the user starts your program load the license and verify the signature using a public key. 6. validate the data in your license key (ex: the end date) lkgen A command line helper lkgen is also provided to generate private keys and create licenses. This is also a good example of how to use the library. Examples Generating a new license: Below is an example of code that generates a license from a private key and a struct containing the end da","default_branch":null,"files":null,"tree":[],"storefront":"/r/hyperboloide","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/hyperboloide/lk/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}