summaryrefslogtreecommitdiff
path: root/rand/rand_chacha/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rand/rand_chacha/src/lib.rs')
-rw-r--r--rand/rand_chacha/src/lib.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/rand/rand_chacha/src/lib.rs b/rand/rand_chacha/src/lib.rs
index 74ad466..e374bdd 100644
--- a/rand/rand_chacha/src/lib.rs
+++ b/rand/rand_chacha/src/lib.rs
@@ -16,10 +16,15 @@
#![deny(missing_debug_implementations)]
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
-#![no_std]
+#![cfg_attr(not(feature = "std"), no_std)]
-pub extern crate rand_core;
+pub use rand_core;
mod chacha;
-pub use chacha::{ChaChaRng, ChaChaCore};
+pub use crate::chacha::{ChaCha12Core, ChaCha12Rng, ChaCha20Core, ChaCha20Rng, ChaCha8Core, ChaCha8Rng};
+
+/// ChaCha with 20 rounds
+pub type ChaChaRng = ChaCha20Rng;
+/// ChaCha with 20 rounds, low-level interface
+pub type ChaChaCore = ChaCha20Core;