public static function XMLSecurityDSig::generateGUID in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7
Generate guid
Parameters
string $prefix Prefix to use for guid. defaults to pfx:
Return value
string The generated guid
3 calls to XMLSecurityDSig::generateGUID()
- XMLSecEnc::addReference in includes/
XMLSecurityKey.php - XMLSecurityDSig::addRefInternal in includes/
XMLSecurityKey.php - XMLSecurityDSig::generate_GUID in includes/
XMLSecurityKey.php - Generate guid
File
- includes/
XMLSecurityKey.php, line 855
Class
Code
public static function generateGUID($prefix = 'pfx') {
$uuid = md5(uniqid(mt_rand(), true));
$guid = $prefix . substr($uuid, 0, 8) . "-" . substr($uuid, 8, 4) . "-" . substr($uuid, 12, 4) . "-" . substr($uuid, 16, 4) . "-" . substr($uuid, 20, 12);
return $guid;
}