commit | 0bb94b32a6367fdc7c7553cf475c480a7960b867 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Thu May 23 23:14:50 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Thu May 23 23:14:50 2024 +0000 |
tree | c94458c2f82c07f6b4d777de92ba143c624422ce | |
parent | fc0b8c6a2b858dd4dd1e83007b837dca91e45c4d [diff] | |
parent | 807463b5bf568845338904fbab771404a7b94b5a [diff] |
Snap for 11881322 from 807463b5bf568845338904fbab771404a7b94b5a to 24Q3-release Change-Id: Ie31f38def52503e4f68bb0e9411f3a7518fb3f8b
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.