# [−][src]Crate rand_jitter

Non-physical true random number generator based on timing jitter.

This is a true random number generator, as opposed to pseudo-random generators. Random numbers generated by `JitterRng` can be seen as fresh entropy. A consequence is that it is orders of magnitude slower than `OsRng` and PRNGs (about 103..106 slower).

There are very few situations where using this RNG is appropriate. Only very few applications require true entropy. A normal PRNG can be statistically indistinguishable, and a cryptographic PRNG should also be as impossible to predict.

Use of `JitterRng` is recommended for initializing cryptographic PRNGs when `OsRng` is not available.

`JitterRng` can be used without the standard library, but not conveniently, you must provide a high-precision timer and carefully have to follow the instructions of [`JitterRng::new_with_timer`].

This implementation is based on Jitterentropy version 2.1.0.

Note: There is no accurate timer available on WASM platforms, to help prevent fingerprinting or timing side-channel attacks. Therefore [`JitterRng::new()`] is not available on WASM. It is also unavailable with disabled `std` feature.

## Re-exports

`pub extern crate rand_core;`

## Structs

JitterRng | A true random number generator based on jitter in the CPU execution time, and jitter in memory access time.

## Enums

TimerError | An error that can occur when `JitterRng::test_timer` fails.

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)