commit | 0786cca4414c72686f863de4c763c9ca2840c732 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Fri Mar 10 04:18:43 2023 +0000 |
committer | Automerger Merge Worker <[email protected]> | Fri Mar 10 04:18:43 2023 +0000 |
tree | c762b46095ff8963dddb35228ea8d5ec2ae85738 | |
parent | 2ff10794859da9c2d437bdf64455069a70bd9240 [diff] | |
parent | ebbb930d233d67a47e045063eaeff10bd5cd8415 [diff] |
Snap for 9719949 from 135502ffa67e72367e6260b6ef67f8b800b2194a to udc-release am: ebbb930d23 Original change: https://googleplex-android-review.googlesource.com/c/platform/external/rust/crates/rand_xorshift/+/21946863 Change-Id: Idaeaa32737535743cb1b58b019f36ca51f2f11f4 Signed-off-by: Automerger Merge Worker <[email protected]>
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.