osrandom 0.1.1

An interface to the OS' secure random number generator
Documentation
  • Coverage
  • 100%
    5 out of 5 items documented0 out of 4 items with examples
  • Size
  • Source code size: 20.18 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 517.26 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • KizzyCode/osrandom-rust
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • KizzyCode

License BSD-2-Clause License MIT docs.rs crates.io Download numbers AppVeyor CI dependency status

osrandom

Welcome to osrandom 🎉

A really minimal wrapper around your operating system's cryptographically secure random number generator.

APIs used

The following native APIs are used:

  • macOS/iOS: SecRandomCopyBytes from the built-in Security.framework
  • FreeBSD/OpenBSD/NetBSD: arc4random_buf (which does not use ARC4 anymore but a secure PRF like ChaCha20)
  • Windows: CryptGenRandom with PROV_RSA_FULL as provider
  • Linux-GNU: getrandom for glibc versions >= 2.25 or /dev/urandom for ancient distributions
  • Linux-MUSL: /dev/urandom for ancient distributions