21 if (is_null($openSSLChecker)) {
22 $openSSLChecker =
oxNew(
'oxOpenSSLFunctionalityChecker');
24 $this->_openSSLChecker = $openSSLChecker;
36 return $this->
generateV5($sSeed, php_uname(
'n'));
65 $sSeed = str_replace(array(
'-',
'{',
'}'),
'', $sSeed);
67 for ($i = 0; $i < strlen($sSeed); $i += 2) {
68 $sBinarySeed .= chr(hexdec($sSeed[$i] . $sSeed[$i + 1]));
70 $sHash = sha1($sBinarySeed . $sSalt);
72 '%08s-%04s-%04x-%04x-%12s',
73 substr($sHash, 0, 8), substr($sHash, 8, 4),
74 (hexdec(substr($sHash, 12, 4)) & 0x0fff) | 0x3000,
75 (hexdec(substr($sHash, 16, 4)) & 0x3fff) | 0x8000,
76 substr($sHash, 20, 12)
99 $sRandomData = openssl_random_pseudo_bytes(16);
100 $sRandomData[6] = chr(ord($sRandomData[6]) & 0x0f | 0x40);
101 $sRandomData[8] = chr(ord($sRandomData[8]) & 0x3f | 0x80);
103 return vsprintf(
'%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($sRandomData), 4));
114 '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
115 mt_rand(0, 0xffff), mt_rand(0, 0xffff),
117 mt_rand(0, 0x0fff) | 0x4000,
118 mt_rand(0, 0x3fff) | 0x8000,
119 mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)