commit | 97c556068a585dc8e691e0f9b714bc6fcff0c57b | [log] [tgz] |
---|---|---|
author | easoncylee <[email protected]> | Fri Jul 02 11:29:27 2021 +0800 |
committer | easoncylee <[email protected]> | Tue Jul 06 10:09:10 2021 +0800 |
tree | 80f678aead2e8020cabb49c9e783297bd49560da | |
parent | df7609799b7968d70f4772e282da8d0382be5cdd [diff] |
Update vpnprofilestore_test to legacykeystore_test in TEST_MAPPING The test had been changed to legacykeystore_test from ag/14968529 Bug: 192796637 Test: presubmit Change-Id: I723c1a569bbb51605e6801a00f74b06c973871d0
A Rust library for retrieving random data from (operating) system source. It is assumed that system always provides high-quality cryptographically secure random data, ideally backed by hardware entropy sources. This crate derives its name from Linux‘s getrandom
function, but is cross platform, roughly supporting the same set of platforms as Rust’s std
lib.
This is a low-level API. Most users should prefer using high-level random-number library like rand
.
Add this to your Cargo.toml
:
[dependencies] getrandom = "0.2"
Then invoke the getrandom
function:
fn get_random_buf() -> Result<[u8; 32], getrandom::Error> { let mut buf = [0u8; 32]; getrandom::getrandom(&mut buf)?; Ok(buf) }
For more information about supported targets, entropy sources, no_std
targets, crate features, WASM support and Custom RNGs see the getrandom
documentation and getrandom::Error
documentation.
This crate requires Rust 1.34.0 or later.
The getrandom
library is distributed under either of
at your option.