public static function XMLSecurityDSig::generateGUID in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 8
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 src/
XMLSecurityKey.php - XMLSecurityDSig::addRefInternal in src/
XMLSecurityKey.php - XMLSecurityDSig::generate_GUID in src/
XMLSecurityKey.php - Generate guid
File
- src/
XMLSecurityKey.php, line 822
Class
Namespace
Drupal\miniorange_samlCode
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;
}