crypto_api_osrandom

Crates.iocrypto_api_osrandom
lib.rscrypto_api_osrandom
version0.2.0
sourcesrc
created_at2019-03-12 18:06:20.223804
updated_at2022-06-17 01:27:26.75543
descriptionAn interface to the OS' secure random number generator for `crypto_api`
homepage
repositoryhttps://github.com/KizzyCode/crypto_api_osrandom
max_upload_size
id120314
size19,215
Keziah Biermann (KizzyCode)

documentation

README

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

crypto_api_osrandom

Welcome to crypto_api_osrandom 🎉

About

This crate implements access to your operating system's cryptographically secure random number generator via crypto_api.

APIs used

The following native APIs are used:

  • macOS/iOS: SecRandomCopyBytes from the 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: getrandom for glibc versions >= 2.25 or /dev/urandom for ancient distributions
Commit count: 27

cargo fmt