commit | e6036b26463f2ecfc9f9d07f42c34cee675db2db | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Thu Aug 29 23:12:12 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Thu Aug 29 23:12:12 2024 +0000 |
tree | d8b644489e4e9310f64ce1015e8074bb614a7d7a | |
parent | 0fd1730c1de327b714c080aa62b48d16b487ea00 [diff] | |
parent | bdbb0d0da577759a6e668230e5d875759b7017da [diff] |
Snap for 12296955 from bdbb0d0da577759a6e668230e5d875759b7017da to 24Q4-release Change-Id: I9cd9276332d79d597474b7cef1abf04ddaf59097
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.