commit | 259f402e782c62d4989353fc802da43c8f8cf90f | [log] [tgz] |
---|---|---|
author | Haamed Gheibi <haamed@google.com> | Thu Sep 23 17:30:31 2021 +0000 |
committer | Haamed Gheibi <haamed@google.com> | Thu Sep 23 17:30:31 2021 +0000 |
tree | bec0501e1094cccd9e6fbeded10ef744d623fd62 | |
parent | 53320c36ab87c002898f2c85317864c0ce10bc4a [diff] | |
parent | a4fb9ddeac57ac8d29041ea9b3f17b340539cd4f [diff] |
Merge TP1A.210812.002 Bug: 198367246 Change-Id: I4831937bb73b94628b54d623477f211719e50730
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.