Skip to content

Commit

Permalink
More readability
Browse files Browse the repository at this point in the history
  • Loading branch information
autquis committed Apr 16, 2024
1 parent 601fb32 commit 025b2c4
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions crypto-primitives/src/crh/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#![allow(clippy::upper_case_acronyms)]
use crate::Error;
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize};
use ark_std::{borrow::Borrow, hash::Hash, rand::Rng};
use ark_std::{borrow::Borrow, fmt::Debug, hash::Hash, rand::Rng};

pub mod bowe_hopwood;
#[cfg(feature = "r1cs")]
pub mod constraints;
Expand All @@ -16,13 +17,7 @@ pub use constraints::*;
/// variable length CRH may also implement this trait in future.
pub trait CRHScheme {
type Input: ?Sized + Send;
type Output: Clone
+ Eq
+ core::fmt::Debug
+ Hash
+ Default
+ CanonicalSerialize
+ CanonicalDeserialize;
type Output: Clone + Eq + Debug + Hash + Default + CanonicalSerialize + CanonicalDeserialize;
type Parameters: Clone + CanonicalSerialize + CanonicalDeserialize + Sync;

fn setup<R: Rng>(r: &mut R) -> Result<Self::Parameters, Error>;
Expand All @@ -37,13 +32,7 @@ pub trait TwoToOneCRHScheme {
/// Raw Input type of TwoToOneCRH
type Input: ?Sized;
/// Raw Output type of TwoToOneCRH
type Output: Clone
+ Eq
+ core::fmt::Debug
+ Hash
+ Default
+ CanonicalSerialize
+ CanonicalDeserialize;
type Output: Clone + Eq + Debug + Hash + Default + CanonicalSerialize + CanonicalDeserialize;
type Parameters: Clone + CanonicalSerialize + CanonicalDeserialize + Sync;

fn setup<R: Rng>(r: &mut R) -> Result<Self::Parameters, Error>;
Expand Down

0 comments on commit 025b2c4

Please sign in to comment.