commit | 8c89e07da83bd5a32591ee9802bf83155547b1d1 | [log] [tgz] |
---|---|---|
author | Victor Hsieh <victorhsieh@google.com> | Wed Dec 16 19:08:34 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Dec 16 19:08:34 2020 +0000 |
tree | e7698ae7a4dc03ca371d28d969fdacf068302d0c | |
parent | 3711f35afb45ebe3788a43b94c8396a0dc79d901 [diff] | |
parent | f854b2c735ac14808ece865ca495d07ff22575d6 [diff] |
Import rand_xorshift from crates.io am: 682e64bdcf am: fde400d2f5 am: f854b2c735 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/rand_xorshift/+/1530847 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I0afecd534f8ca9c0a88cdd8485419a960afaafb7
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.