rand_testsuite/README.md
Charlotte 🦝 Delenk b56d1b1314
All checks were successful
Hydra x86_64-linux.packages.rand_testsuite Hydra build #2619 of procyos:rand_testsuite:x86_64-linux.packages.rand_testsuite
Hydra x86_64-linux.checks.rand_testsuite Hydra build #2620 of procyos:rand_testsuite:x86_64-linux.checks.rand_testsuite
add monobit test
2024-09-06 10:20:10 +02:00

72 lines
1.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# rand_testsuite
A Testsuite for random number generators. It implements NIST 800-22.
It is intended to be more as a smoketest to ensure that random number generation isnt completely broken.
## Crate Features
rand_testsuite defines the following features:
- `std`: Uses the `std` librarys maths routines instead of a freestanding pure-rust implementation.
- `rand_core`: Allows you to directly test `RngCore` trait implementations. Enables allocations.
## Getting Started
This is how you may use this crate to evaluate a random number generator (requires `rand_core`!)
```rust,ignore
let mut rng = rand::thread_rng();
assert!(CombinedRandomTest::default().evaluate_rng(&mut rng).unwrap_or_default() > 0.01);
```
### Installing
You can add this library to your crate with the following command:
```sh,ignore
cargo add rand_testsuite --dev
```
This makes the dependency available in testsuites.
## Running the tests
```sh,ignore
cargo test
nix flake check .
```
## Built With
- [Contributor Covenant](https://www.contributor-covenant.org/) - Used for the Code of Conduct
## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code
of conduct, and the process for submitting pull requests to us.
## Versioning
We use [Semantic Versioning](http://semver.org/) for versioning. For the versions
available, see the [tags on this
repository](https://github.com/PurpleBooth/a-good-readme-template/tags).
## Authors
- **Charlotte 🦝 Delenk** [DarkKirb](https://lotte.chir.rs)
See also the list of
[contributors](https://git.chir.rs/ProcyOS/rand_testsuite/activity/contributors)
who participated in this project.
## License
Licensed under either of
* Apache License, Version 2.0
[LICENSE-APACHE](LICENSE-APACHE)
* MIT license
[LICENSE-MIT](LICENSE-MIT)
at your option.