$pub_key = openssl_pkey_get_details($ssl);
$pub_key = $pub_key["key"];
- file_put_contents("{$d}/pub.key",$pub_key);
- file_put_contents("{$d}/pri.key",$pri_key);
+ file_put_contents("{$dir}/pub.key",$pub_key);
+ file_put_contents("{$dir}/pri.key",$pri_key);
}
function getSetting($m,$n)
function encrypt($v)
{
- $dir = $this->keyDir();
- $pub_key = file_get_contents("{$dir}/pub.key");
+ $pub_key = file_get_contents("{$this->keyDir()}/pub.key");
if(!$pub_key) {
return;
}