|
Into the AVLockGold package are included two samples of key generators writen in php language:
avgold_uname.php for username based keys and avgold_icode.php for installcode based keys.
You will need to edit the following section and enter here your own values
for encryptionkey, appid and users, and configure it for permanent or temporary
key generation.
//***put here your own values***
$enckey = 'myencryptionkey123';
$appid = 1234567;
$usrs = 1;
$modul = 0;
// --Permanent key--
//$days = 65535; // authorized days
//$startdate = 65535; // date from where starts the authorized period
// --Tempoprary key-- 14 days from the current date
$days = 14;
$startdate = (int) (gmdate("U")/86400)+25569;
//current date (GMT) in delphi mode (days from 12/31/1899
// gmdate("U") = seconds from 01/01/1970 up to the current date (GMT)
// 86400 = seconds by one day (60 * 60 * 24)
// 25569 = days from 12/31/1899 to 01/01/1970
//******************************
You will need rijndael support in your server. To enable it you have to have the mcrypt extension enabled. If you are on windows you'll
need to edit your php.ini to enable the line "extension=php_mcrypt.dll" and then download the extra libraries by following the links on http://www.php.net/manual/en/ref.mcrypt.php
Copy libmcrypt.dll into a folder that is in your system path
(c:\winnt\system32, for example).
Make sure that you extension_dir php.ini option points to the correct location. For example:
extension_dir=c:\php\extensions
Uncomment/add line extension=php_mcrypt.dll in your php.ini
|