commit | f7b04b5fa34b456ff4f6260c7d60120edd021271 | [log] [tgz] |
---|---|---|
author | Joel Galenson <[email protected]> | Thu Jun 03 21:19:39 2021 +0000 |
committer | Automerger Merge Worker <[email protected]> | Thu Jun 03 21:19:39 2021 +0000 |
tree | bec0501e1094cccd9e6fbeded10ef744d623fd62 | |
parent | 4a609f2310bbdebdd30670badaa8872a08a5245c [diff] | |
parent | 85d99d1abf515f2a5747f482c21333b09892b0f4 [diff] |
Use new c2a functionality instead of a patch. am: b3fa6077a0 am: acaf608c3f am: 1f6601c3fd am: 85d99d1abf Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/rand_xorshift/+/1725432 Change-Id: Idd91f0725e264a212f4ca944307aa98cbb6896b0
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.