commit | 89d052b50615a50924866f2c4a2530a97471787d | [log] [tgz] |
---|---|---|
author | android-build-team Robot <[email protected]> | Thu Feb 18 02:05:32 2021 +0000 |
committer | android-build-team Robot <[email protected]> | Thu Feb 18 02:05:32 2021 +0000 |
tree | 03c748bb3fdd4e0765997a417536bb1aaf7c4838 | |
parent | 6d0cee853aaf95fb019b55b19054c8382b296bb1 [diff] | |
parent | 9e8f2fabf21a74757dd5bcabe42e7a7300e28196 [diff] |
Snap for 7152399 from 9e8f2fabf21a74757dd5bcabe42e7a7300e28196 to sc-release Change-Id: Iab2732f9e8d84ed7ce098e3f7db279fd1937637c
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.