Commit Graph

8 Commits

Author SHA1 Message Date
tinko92
24e3e0db36 Fix for typo (LICENCE) and for https links to license (#103)
* Fix Typo in link to License.
* Changed links to https.
2019-04-22 08:56:05 -04:00
James E. King III
9b1988001f fix test code warning in matrix build: hides previous local declaration 2018-10-12 08:12:23 -04:00
Andrey Semashev
4a9f620b6d Add support for movability to random generators. Fix POSIX random provider.
The commit adds support for move constructors and assignment to random UUID
generators and random providers. Also, in POSIX random provider, the commit
improves handling of return value from ::read(), which returns -1
in case of error and may return 0 in case of success. Retry the call when
it was interrupted before reading any bytes from /dev/urandom.

Added new tests for movability and compile-fail tests for no copyability.

This addresses GitHub issue:

https://github.com/boostorg/uuid/issues/71
2018-06-18 10:24:46 -04:00
James E. King III
a8a1ec3d82 Changed the default random_generator implementation to use
operating-system provided entropy as it is more secure and
faster for the typical use case of generating one uuid at
a time.

This is a breaking change for anyone passing a mt19937
into one of the explicit constructors of random_generator,
which would be quite rare.

Changed the default random provider on Windows to use BCrypt
where available, falling back to Wincrypt when necessary or
when explicitly requested through a macro.

Provide a new random_generator_mt19937 type definition for
use cases where a large number of uuids need to be created
with high performance.  This is equivalent to the previous
definition of random_generator.

Provide a random generation benchmark test showing the
cutoff where the mt19937-based generator will outperform the
standard generator based on wall time.

Removed template specialization for boost::random::random_device
so that any UniformRandomNumberGenerator can be used properly
with random_generator.

Replaced the seed_rng detail implementation (which had a number
of flaws) with a replacement header-only random_provider
implementation.

Note: entropy generation errors will cause an entropy_error
to be thrown from random_generator.  The previous implementation
ignored errors and silently failed.

Added internal support for entropy generation on cloudabi
platform leveraging the new random_provider implementation.

Added internal support for Universal Windows Platform (UWP)
development leveraging the new random_provider implementation.

Added internal support for getentropy() on Linux and OpenBSD
if certain requirements are met.

This fixes #24
This closes #53
2017-12-18 09:56:02 -05:00
James E. King, III
7ba5d2b46a 12258: re-enable unit test for random_device generator 2017-08-10 12:07:03 -04:00
Andy Tompkins
5e684f7779 Ticket #5235
[SVN r69592]
2011-03-05 23:55:25 +00:00
Andy Tompkins
474e9bef15 Fixed bug in basic_random_generator. It wasn't producing random uuids correctly.
[SVN r60699]
2010-03-19 01:44:52 +00:00
Andy Tompkins
6ee1d64394 switch from the Boost Test Library to boost/detail/lightweight_test.hpp
moved uuid generators into their own file

[SVN r59535]
2010-02-06 22:32:49 +00:00