Loading src/rust/crypto/lib.rs +8 −0 Original line number Diff line number Diff line Loading @@ -29,9 +29,17 @@ // External crates from cargo or TOR_RUST_DEPENDENCIES. extern crate digest; extern crate libc; extern crate rand_core; // External dependencies for tests. #[cfg(test)] extern crate rand as rand_crate; // Our local crates. extern crate external; #[cfg(not(test))] #[macro_use] extern crate tor_log; pub mod digests; // Unfortunately named "digests" plural to avoid name conflict with the digest crate pub mod rand; Loading src/rust/crypto/rand/mod.rs +0 −10 Original line number Diff line number Diff line Loading @@ -2,15 +2,5 @@ // Copyright (c) 2018, isis agora lovecruft // See LICENSE for licensing information // External dependencies #[cfg(test)] extern crate rand; extern crate rand_core; // Internal dependencies extern crate external; #[cfg(not(test))] #[macro_use] extern crate tor_log; pub mod rng; src/rust/crypto/rand/rng.rs +2 −2 Original line number Diff line number Diff line Loading @@ -130,8 +130,8 @@ mod internal { #[cfg(test)] mod internal { // It doesn't matter if we pretend ChaCha is a CSPRNG in tests. pub use rand::ChaChaRng as TorRng; pub use rand::ChaChaRng as TorStrongestRng; pub use rand_crate::ChaChaRng as TorRng; pub use rand_crate::ChaChaRng as TorStrongestRng; } // Finally, expose the public functionality of whichever appropriate internal Loading Loading
src/rust/crypto/lib.rs +8 −0 Original line number Diff line number Diff line Loading @@ -29,9 +29,17 @@ // External crates from cargo or TOR_RUST_DEPENDENCIES. extern crate digest; extern crate libc; extern crate rand_core; // External dependencies for tests. #[cfg(test)] extern crate rand as rand_crate; // Our local crates. extern crate external; #[cfg(not(test))] #[macro_use] extern crate tor_log; pub mod digests; // Unfortunately named "digests" plural to avoid name conflict with the digest crate pub mod rand; Loading
src/rust/crypto/rand/mod.rs +0 −10 Original line number Diff line number Diff line Loading @@ -2,15 +2,5 @@ // Copyright (c) 2018, isis agora lovecruft // See LICENSE for licensing information // External dependencies #[cfg(test)] extern crate rand; extern crate rand_core; // Internal dependencies extern crate external; #[cfg(not(test))] #[macro_use] extern crate tor_log; pub mod rng;
src/rust/crypto/rand/rng.rs +2 −2 Original line number Diff line number Diff line Loading @@ -130,8 +130,8 @@ mod internal { #[cfg(test)] mod internal { // It doesn't matter if we pretend ChaCha is a CSPRNG in tests. pub use rand::ChaChaRng as TorRng; pub use rand::ChaChaRng as TorStrongestRng; pub use rand_crate::ChaChaRng as TorRng; pub use rand_crate::ChaChaRng as TorStrongestRng; } // Finally, expose the public functionality of whichever appropriate internal Loading