- The
ByteNumberGenerator::getNumber()will now throw anGeneratorExceptionif the difference between minimum and maximum is not an integer - Rely on
unpack()rather thanhexdec(bin2hex())due to being less likely to be affected by timing vulnerabilities. - Require phpcs and php-cs-fixer as external dependencies in the travis build instead of including them as dev dependencies
- The minimum required PHP version has been increased to 5.6
- Updated the test suite to work with PHPUnit 6
- Updated the travis build to test for PHP 7.1
- Updated to latest coding standards
- Added
SecureRandom::getRandom()which returns a random float between 0 and 1 with more uniform distribution and always less than 1. - Added
SecureRandom::getUuid()which returns a random version 4 UUID. - Added
Generator\ByteNumberGeneratorthat wraps nonNumberGeneratorgenerators for generating random numbers - Improved the bundled autoloader slightly
- Added support for PHP's internal CSPRNG in php 7.0 (which is used by default)
- Added NumberGenerator interface for generators that can natively generate numbers
- Address some unlikely corner cases
- Improve coding standards in some areas of code
- Improvements in code quality and documentation
- Added a simple test for even distribution
- composer.json now lists openssl and mcrypt as suggested packages instead of being listed as requirements
- Reading from /dev/urandom now uses buffered reads instead of custom buffer
- Generators now throw GeneratorException instead of returning false on error
- Made corrections to some parts of the documentation
- Zero length sequence from empty choices now returns an empty sequence
- Initial release