commit | 85d99d1abf515f2a5747f482c21333b09892b0f4 | [log] [tgz] |
---|---|---|
author | Joel Galenson <jgalenson@google.com> | Thu Jun 03 21:05:51 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Jun 03 21:05:51 2021 +0000 |
tree | bec0501e1094cccd9e6fbeded10ef744d623fd62 | |
parent | b98f01bfdc05190918fa9bdc8df2cba2f65051db [diff] | |
parent | 1f6601c3fdb147773982046778a4938d251c3bdc [diff] |
Use new c2a functionality instead of a patch. am: b3fa6077a0 am: acaf608c3f am: 1f6601c3fd Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/rand_xorshift/+/1725432 Change-Id: I5ca4fbf1a87b8a4b9c170ce6161522b3ccc90a32
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.