Skip to content

Commit

Permalink
Cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
gnongsie committed Dec 3, 2024
1 parent b324d1b commit 76743fc
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions lib/SecurityUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ public function generateSecurityToken($xmlDom, $certificateFilePath, $keyPass, &
$pubcert = explode("\n", $certs['cert']);
array_shift($pubcert);

while (!trim(array_pop($pubcert)))
{

}
while (!trim(array_pop($pubcert))) { /* Empty whlie loop */ }

array_walk($pubcert, 'trim');
$pubcert = implode('', $pubcert);
Expand All @@ -46,24 +43,6 @@ public function generateSecurityToken($xmlDom, $certificateFilePath, $keyPass, &
return $tokenElement;
}

/**
* Sample UUID function, based on random number or provided data
*
* @param mixed $data
* @return string
*/
function getUUID($data = null)
{
if ($data === null)
{
$data = microtime() . uniqid();
}

$id = md5($data);

return sprintf('%08s-%04s-%04s-%04s-%012s', substr($id, 0, 8), substr($id, 8, 4), substr($id, 12, 4), substr(16, 4), substr($id, 20));
}

/**
* XML canonicalization
*
Expand Down

0 comments on commit 76743fc

Please sign in to comment.