GreenScreens Web 5250 Terminal URL address uses custom encryption based on RSA algorithm generated at GreenScreens Terminal Service to protect URL parameters like auto sign-on data.
Some clients require server side generation of terminal URL address inside their own software so here comes PHP URL Encrypter an integration supporting lib .
Example usage to generate encrypted url address
<?php
require_once "funcs.php";
// Green Screens RSA service URL to get encryption public key
$GREENSCRES_SERVICE = "http://localhost:9080";
// use only UUID and DEMO as a virtual host name
$json = encrypt($GREENSCRES_SERVICE, "0", "DEMO");
// generate http://localhost:9080/lite?d=[HEX encrypted AES]&k=[RSA encrypted AES]
$url = jsonToURLService($GREENSCRES_SERVICE, $json);
print $url;
print "\n";
?>
Result should be like this one :
To generate auto sign-on url address :
$json = encrypt($RSA_SERVICE, "0", "DEMO", "QSECOFR", "MYPASWORD");
To generate auto sign-on url address with program to start
$json = encrypt($RSA_SERVICE, "0", "DEMO", "QSECOFR", "MYPASWORD", "PROGRAM", "MENU", "LIB");
To generate url address with program to start on sign-on
$json = encrypt($RSA_SERVICE, "0", "DEMO", null, null, "PROGRAM", "MENU", "LIB");
To generate url address protected with OTP. (create OTP at localhost:9080/otp)
$code = getOTP("7OP4Y7NVCAJZP2KW");
$json = encrypt($GREENSCREENS_SERVICE, "2", "DEMO", "QSECOFR", "MYPASSWORD", null, null, null, 0, null, $code);