Documentation on the License Manager can be found here.
If you're using flat files, simply file_put_contents for the license key, license data, and public key. So, you'd have 3 files. Then you would just file_get_contents and assign them to the their respective variables.