commit | 0ef39c2699a3f021569c7c7b2ae42077aecaf0a9 | [log] [tgz] |
---|---|---|
author | android-build-team Robot <android-build-team-robot@google.com> | Mon Jan 18 11:00:47 2021 +0000 |
committer | android-build-team Robot <android-build-team-robot@google.com> | Mon Jan 18 11:00:47 2021 +0000 |
tree | 0b1632da5b5b4cbce8ffd10f76d5817c6a1f28e5 | |
parent | 8c89e07da83bd5a32591ee9802bf83155547b1d1 [diff] | |
parent | ebe7b2dfded04443d768313317df86146b6ed673 [diff] |
Snap for 7088030 from ebe7b2dfded04443d768313317df86146b6ed673 to tm-release Change-Id: Ic5b131e0e7806b92cb56d5644834e703d3e849f3
Implements the Xorshift random number generator.
The Xorshift[^1] algorithm is not suitable for cryptographic purposes but is very fast. If you do not know for sure that it fits your requirements, use a more secure one such as StdRng
or OsRng
.
[^1]: Marsaglia, George (July 2003). "Xorshift RNGs". Journal of Statistical Software. Vol. 8 (Issue 14).
Links:
rand_xorshift
is no_std
compatible. It does not require any functionality outside of the core
lib, thus there are no features to configure.
The serde1
feature includes implementations of Serialize
and Deserialize
for the included RNGs.
rand_xorshift
is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT, and COPYRIGHT for details.