Added details++; Vendor updates
This commit is contained in:
5
Laravel/vendor/ramsey/uuid/CHANGELOG.md
vendored
5
Laravel/vendor/ramsey/uuid/CHANGELOG.md
vendored
@@ -1,5 +1,10 @@
|
||||
# ramsey/uuid Changelog
|
||||
|
||||
## 3.7.1
|
||||
|
||||
* Use `random_bytes()` when generating random nodes
|
||||
* Set the multicast bit for random nodes, according to RFC 4122, §4.5, [#170](https://github.com/ramsey/uuid/pull/170), [#171](https://github.com/ramsey/uuid/pull/171), [#182](https://github.com/ramsey/uuid/pull/182)
|
||||
|
||||
## 3.7.0
|
||||
|
||||
_Released: 2017-08-04_
|
||||
|
@@ -31,6 +31,11 @@ class RandomNodeProvider implements NodeProviderInterface
|
||||
*/
|
||||
public function getNode()
|
||||
{
|
||||
return sprintf('%06x%06x', mt_rand(0, 0xffffff), mt_rand(0, 0xffffff));
|
||||
$node = hexdec(bin2hex(random_bytes(6)));
|
||||
|
||||
// Set the multicast bit; see RFC 4122, section 4.5.
|
||||
$node = $node | 0x010000000000;
|
||||
|
||||
return str_pad(dechex($node), 12, '0', STR_PAD_LEFT);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user