2019-02-18 12:10:29 +00:00
2019-02-05 20:59:26 +03:00
2019-02-05 22:07:56 +03:00
2019-01-19 12:56:20 +00:00
2019-02-06 22:03:33 +00:00
2019-01-19 12:56:20 +00:00
2019-01-19 12:56:20 +00:00
2019-01-19 12:56:20 +00:00

Rand

Build Status Build Status Crate API

A Rust library to securely get random entropy. 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 a high-level random-number library like Rand or a cryptography library.

Usage

Add this to your Cargo.toml:

[dependencies]
getrandom = "0.1"

Then invoke the getrandom function:

fn get_random_buf() -> Result<[u8; 32], getrandom::Error> {
    let mut buf = [0u8; 32];
    getrandom::getrandom(&mut buf)?;
    buf
}

License

The getrandom library 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.

Description
A small cross-platform library for retrieving random data from (operating) system source (fork from https://github.com/rust-random/getrandom)
Readme 1.2 MiB