commit | a986e8f0a67089f53ef1e59b1966a439d2bd0416 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Sat Nov 18 02:13:38 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Sat Nov 18 02:13:38 2023 +0000 |
tree | c896a7d4cbf1ec3d06ac0f38da9323eb4e2a7d1e | |
parent | 40ecb9cad9a4b98a16c316ea94bf3f29f1e32bc8 [diff] | |
parent | 0dd180cc0faf2736ec64bb8c4ce3d3e4f64f1824 [diff] |
Snap for 11117647 from 0dd180cc0faf2736ec64bb8c4ce3d3e4f64f1824 to 24Q1-release Change-Id: I8efa4485757a55e6ede36faddb831adb818542bb
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.