Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chacha20: remove Clone impls on RNGs #220

Merged
merged 1 commit into from
Mar 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions chacha20/src/rng.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
//! Block RNG based on rand_core::BlockRng

use rand_core::block::{BlockRng, BlockRngCore};
use rand_core::{CryptoRng, Error, RngCore, SeedableRng};
use rand_core::{
block::{BlockRng, BlockRngCore},
CryptoRng, Error, RngCore, SeedableRng,
};

use crate::{
backend::{Core, BUFFER_SIZE},
Expand All @@ -13,7 +15,6 @@ use core::convert::TryInto;
macro_rules! impl_chacha_rng {
($name:ident, $core:ident, $rounds:ident, $doc:expr) => {
#[doc = $doc]
#[derive(Clone)]
#[cfg_attr(docsrs, doc(cfg(feature = "rng")))]
pub struct $name(BlockRng<$core>);

Expand Down Expand Up @@ -52,7 +53,6 @@ macro_rules! impl_chacha_rng {
impl CryptoRng for $name {}

#[doc = "Core random number generator, for use with [`rand_core::block::BlockRng`]"]
#[derive(Clone)]
#[cfg_attr(docsrs, doc(cfg(feature = "rng")))]
pub struct $core {
block: Core<$rounds>,
Expand Down