aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/ramsey/uuid/src/Generator
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-12-12 14:51:10 +0000
committerMario <mario@mariovavti.com>2019-12-12 14:51:10 +0000
commit544ef3bc588d4180d7ecad15bdacd43813a7c5c5 (patch)
tree62372d0af859287235f62f20d0cf55b5b5b1ace3 /vendor/ramsey/uuid/src/Generator
parent124cc4396247c75c14280136cfaa95415860ad4c (diff)
downloadvolse-hubzilla-544ef3bc588d4180d7ecad15bdacd43813a7c5c5.tar.gz
volse-hubzilla-544ef3bc588d4180d7ecad15bdacd43813a7c5c5.tar.bz2
volse-hubzilla-544ef3bc588d4180d7ecad15bdacd43813a7c5c5.zip
update composer libs and minor notifications display fixes
Diffstat (limited to 'vendor/ramsey/uuid/src/Generator')
-rw-r--r--vendor/ramsey/uuid/src/Generator/CombGenerator.php11
-rw-r--r--vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php19
-rw-r--r--vendor/ramsey/uuid/src/Generator/MtRandGenerator.php4
-rw-r--r--vendor/ramsey/uuid/src/Generator/OpenSslGenerator.php5
-rw-r--r--vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php4
-rw-r--r--vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php10
-rw-r--r--vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php10
-rw-r--r--vendor/ramsey/uuid/src/Generator/SodiumRandomGenerator.php5
-rw-r--r--vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php10
9 files changed, 54 insertions, 24 deletions
diff --git a/vendor/ramsey/uuid/src/Generator/CombGenerator.php b/vendor/ramsey/uuid/src/Generator/CombGenerator.php
index 7a9482318..1d4a5f604 100644
--- a/vendor/ramsey/uuid/src/Generator/CombGenerator.php
+++ b/vendor/ramsey/uuid/src/Generator/CombGenerator.php
@@ -14,7 +14,10 @@
namespace Ramsey\Uuid\Generator;
+use Exception;
+use InvalidArgumentException;
use Ramsey\Uuid\Converter\NumberConverterInterface;
+use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
/**
* CombGenerator provides functionality to generate COMB (combined GUID/timestamp)
@@ -53,14 +56,14 @@ class CombGenerator implements RandomGeneratorInterface
*
* @param integer $length The number of bytes of random binary data to generate
* @return string A binary string
- * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present
- * @throws \InvalidArgumentException if length is not a positive integer
- * @throws \Exception
+ * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present
+ * @throws InvalidArgumentException if length is not a positive integer
+ * @throws Exception
*/
public function generate($length)
{
if ($length < self::TIMESTAMP_BYTES || $length < 0) {
- throw new \InvalidArgumentException('Length must be a positive integer.');
+ throw new InvalidArgumentException('Length must be a positive integer.');
}
$hash = '';
diff --git a/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php b/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php
index c9969b3af..5c5ccb294 100644
--- a/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php
+++ b/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php
@@ -14,8 +14,11 @@
namespace Ramsey\Uuid\Generator;
+use Exception;
+use InvalidArgumentException;
use Ramsey\Uuid\BinaryUtils;
use Ramsey\Uuid\Converter\TimeConverterInterface;
+use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
use Ramsey\Uuid\Provider\NodeProviderInterface;
use Ramsey\Uuid\Provider\TimeProviderInterface;
@@ -72,10 +75,10 @@ class DefaultTimeGenerator implements TimeGeneratorInterface
* could arise when the clock is set backwards in time or if the node ID
* changes.
* @return string A binary string
- * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called on a 32-bit system and
+ * @throws UnsatisfiedDependencyException if called on a 32-bit system and
* `Moontoast\Math\BigNumber` is not present
- * @throws \InvalidArgumentException
- * @throws \Exception if it was not possible to gather sufficient entropy
+ * @throws InvalidArgumentException
+ * @throws Exception if it was not possible to gather sufficient entropy
*/
public function generate($node = null, $clockSeq = null)
{
@@ -96,14 +99,14 @@ class DefaultTimeGenerator implements TimeGeneratorInterface
$hex = vsprintf(
'%08s%04s%04s%02s%02s%012s',
- array(
+ [
$uuidTime['low'],
$uuidTime['mid'],
sprintf('%04x', $timeHi),
sprintf('%02x', $clockSeqHi),
sprintf('%02x', $clockSeq & 0xff),
$node,
- )
+ ]
);
return hex2bin($hex);
@@ -115,8 +118,8 @@ class DefaultTimeGenerator implements TimeGeneratorInterface
*
* @param string|int $node A node value that may be used to override the node provider
* @return string Hexadecimal representation of the node ID
- * @throws \InvalidArgumentException
- * @throws \Exception
+ * @throws InvalidArgumentException
+ * @throws Exception
*/
protected function getValidNode($node)
{
@@ -130,7 +133,7 @@ class DefaultTimeGenerator implements TimeGeneratorInterface
}
if (!ctype_xdigit($node) || strlen($node) > 12) {
- throw new \InvalidArgumentException('Invalid node value');
+ throw new InvalidArgumentException('Invalid node value');
}
return strtolower(sprintf('%012s', $node));
diff --git a/vendor/ramsey/uuid/src/Generator/MtRandGenerator.php b/vendor/ramsey/uuid/src/Generator/MtRandGenerator.php
index f58b78357..8d4b5f9b9 100644
--- a/vendor/ramsey/uuid/src/Generator/MtRandGenerator.php
+++ b/vendor/ramsey/uuid/src/Generator/MtRandGenerator.php
@@ -18,6 +18,10 @@ namespace Ramsey\Uuid\Generator;
* MtRandRandomGenerator provides functionality to generate strings of random
* binary data using the `mt_rand()` PHP function
*
+ * @deprecated The mt_rand() function is not a reliable source of randomness.
+ * The default RandomBytesGenerator, which uses the random_bytes() function,
+ * is recommended as the safest and most reliable source of randomness.
+ * <em>This generator will be removed in ramsey/uuid 4.0.0.</em>
* @link http://php.net/mt_rand
*/
class MtRandGenerator implements RandomGeneratorInterface
diff --git a/vendor/ramsey/uuid/src/Generator/OpenSslGenerator.php b/vendor/ramsey/uuid/src/Generator/OpenSslGenerator.php
index e8ec6a4d8..47abf9bb5 100644
--- a/vendor/ramsey/uuid/src/Generator/OpenSslGenerator.php
+++ b/vendor/ramsey/uuid/src/Generator/OpenSslGenerator.php
@@ -21,6 +21,11 @@ namespace Ramsey\Uuid\Generator;
* The use of this generator requires PHP to be compiled using the
* `--with-openssl` option.
*
+ * @deprecated The openssl_random_pseudo_bytes() function is not a reliable
+ * source of randomness. The default RandomBytesGenerator, which uses the
+ * random_bytes() function, is recommended as the safest and most reliable
+ * source of randomness.
+ * <em>This generator will be removed in ramsey/uuid 4.0.0.</em>
* @link http://php.net/openssl_random_pseudo_bytes
*/
class OpenSslGenerator implements RandomGeneratorInterface
diff --git a/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php b/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php
index aaa285df0..cc3d37989 100644
--- a/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php
+++ b/vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php
@@ -14,6 +14,8 @@
namespace Ramsey\Uuid\Generator;
+use Exception;
+
/**
* RandomBytesGenerator provides functionality to generate strings of random
* binary data using `random_bytes()` function in PHP 7+ or paragonie/random_compat
@@ -28,7 +30,7 @@ class RandomBytesGenerator implements RandomGeneratorInterface
*
* @param integer $length The number of bytes of random binary data to generate
* @return string A binary string
- * @throws \Exception if it was not possible to gather sufficient entropy
+ * @throws Exception if it was not possible to gather sufficient entropy
*/
public function generate($length)
{
diff --git a/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php b/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php
index 3a1bcae7e..b791d60d4 100644
--- a/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php
+++ b/vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php
@@ -14,6 +14,10 @@
namespace Ramsey\Uuid\Generator;
+use Exception;
+use InvalidArgumentException;
+use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
+
/**
* RandomGeneratorInterface provides functionality to generate strings of random
* binary data
@@ -25,9 +29,9 @@ interface RandomGeneratorInterface
*
* @param integer $length The number of bytes of random binary data to generate
* @return string A binary string
- * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present
- * @throws \InvalidArgumentException
- * @throws \Exception if it was not possible to gather sufficient entropy
+ * @throws UnsatisfiedDependencyException if `Moontoast\Math\BigNumber` is not present
+ * @throws InvalidArgumentException
+ * @throws Exception if it was not possible to gather sufficient entropy
*/
public function generate($length);
}
diff --git a/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php b/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php
index 25b54a834..5aa0e8865 100644
--- a/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php
+++ b/vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php
@@ -19,9 +19,9 @@ use RandomLib\Factory;
/**
* RandomLibAdapter provides functionality to generate strings of random
- * binary data using the ircmaxell/random-lib library
+ * binary data using the paragonie/random-lib library
*
- * @link https://packagist.org/packages/ircmaxell/random-lib
+ * @link https://packagist.org/packages/paragonie/random-lib
*/
class RandomLibAdapter implements RandomGeneratorInterface
{
@@ -33,10 +33,10 @@ class RandomLibAdapter implements RandomGeneratorInterface
/**
* Constructs a `RandomLibAdapter` using a `RandomLib\Generator`
*
- * By default, if no `Generator` is passed in, this creates a medium-strength
+ * By default, if no `Generator` is passed in, this creates a high-strength
* generator to use when generating random binary data.
*
- * @param Generator $generator An ircmaxell/random-lib `Generator`
+ * @param Generator $generator An paragonie/random-lib `Generator`
*/
public function __construct(Generator $generator = null)
{
@@ -45,7 +45,7 @@ class RandomLibAdapter implements RandomGeneratorInterface
if ($this->generator === null) {
$factory = new Factory();
- $this->generator = $factory->getMediumStrengthGenerator();
+ $this->generator = $factory->getHighStrengthGenerator();
}
}
diff --git a/vendor/ramsey/uuid/src/Generator/SodiumRandomGenerator.php b/vendor/ramsey/uuid/src/Generator/SodiumRandomGenerator.php
index 6b08f5402..f4ccf8593 100644
--- a/vendor/ramsey/uuid/src/Generator/SodiumRandomGenerator.php
+++ b/vendor/ramsey/uuid/src/Generator/SodiumRandomGenerator.php
@@ -18,6 +18,11 @@ namespace Ramsey\Uuid\Generator;
* SodiumRandomGenerator provides functionality to generate strings of random
* binary data using the PECL libsodium extension
*
+ * @deprecated As of PHP 7.2.0, the libsodium extension is bundled with PHP, and
+ * the random_bytes() PHP function is now the recommended method for
+ * generating random byes. The default RandomBytesGenerator uses the
+ * random_bytes() function.
+ * <em>This generator will be removed in ramsey/uuid 4.0.0.</em>
* @link http://pecl.php.net/package/libsodium
* @link https://paragonie.com/book/pecl-libsodium
*/
diff --git a/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php b/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php
index cb182ea00..27c74590f 100644
--- a/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php
+++ b/vendor/ramsey/uuid/src/Generator/TimeGeneratorInterface.php
@@ -14,6 +14,10 @@
namespace Ramsey\Uuid\Generator;
+use Exception;
+use InvalidArgumentException;
+use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
+
/**
* TimeGeneratorInterface provides functionality to generate strings of binary
* data for version 1 UUIDs based on a host ID, sequence number, and the current
@@ -30,10 +34,10 @@ interface TimeGeneratorInterface
* could arise when the clock is set backwards in time or if the node ID
* changes.
* @return string A binary string
- * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException if called on a 32-bit system and
+ * @throws UnsatisfiedDependencyException if called on a 32-bit system and
* `Moontoast\Math\BigNumber` is not present
- * @throws \InvalidArgumentException
- * @throws \Exception if it was not possible to gather sufficient entropy
+ * @throws InvalidArgumentException
+ * @throws Exception if it was not possible to gather sufficient entropy
*/
public function generate($node = null, $clockSeq = null);
}