1// Copyright 2018 Developers of the Rand project.
2//
3// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6// option. This file may not be copied, modified, or distributed
7// except according to those terms.
8
9//! The ChaCha random number generator.
10
11#![doc(
12 html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
13 html_favicon_url = "https://www.rust-lang.org/favicon.ico",
14 html_root_url = "https://rust-random.github.io/rand/"
15)]
16#![deny(missing_docs)]
17#![deny(missing_debug_implementations)]
18#![doc(test(attr(allow(unused_variables), deny(warnings))))]
19#![cfg_attr(not(feature = "std"), no_std)]
20
21pub use rand_core;
22
23mod chacha;
24mod guts;
25
26pub use crate::chacha::{
27 ChaCha12Core, ChaCha12Rng, ChaCha20Core, ChaCha20Rng, ChaCha8Core, ChaCha8Rng,
28};
29
30/// ChaCha with 20 rounds
31pub type ChaChaRng = ChaCha20Rng;
32/// ChaCha with 20 rounds, low-level interface
33pub type ChaChaCore = ChaCha20Core;
34