@@ -15,7 +15,7 @@ use core::iter::{self, Map, Repeat, Zip};
1515use derive_where:: derive_where;
1616use digest:: { Digest , Output , OutputSizeUser } ;
1717use generic_array:: typenum:: Unsigned ;
18- use generic_array:: GenericArray ;
18+ use generic_array:: { ArrayLength , GenericArray } ;
1919use rand_core:: { CryptoRng , RngCore } ;
2020
2121use crate :: common:: {
@@ -132,7 +132,10 @@ impl<CS: CipherSuite> PoprfClient<CS> {
132132 proof : & Proof < CS > ,
133133 pk : <CS :: Group as Group >:: Elem ,
134134 info : Option < & [ u8 ] > ,
135- ) -> Result < Output < CS :: Hash > > {
135+ ) -> Result < Output < CS :: Hash > >
136+ where
137+ <<CS as CipherSuite >:: Hash as OutputSizeUser >:: OutputSize : ArrayLength ,
138+ {
136139 let clients = core:: array:: from_ref ( self ) ;
137140 let messages = core:: array:: from_ref ( evaluation_element) ;
138141
@@ -167,6 +170,7 @@ impl<CS: CipherSuite> PoprfClient<CS> {
167170 <& ' a IC as IntoIterator >:: IntoIter : ExactSizeIterator ,
168171 & ' a IM : ' a + IntoIterator < Item = & ' a EvaluationElement < CS > > ,
169172 <& ' a IM as IntoIterator >:: IntoIter : ExactSizeIterator ,
173+ <<CS as CipherSuite >:: Hash as OutputSizeUser >:: OutputSize : ArrayLength ,
170174 {
171175 let unblinded_elements = poprf_unblind ( clients, messages, pk, proof, info) ?;
172176
@@ -672,7 +676,7 @@ type FinalizeAfterUnblindResult<'a, CS, IE, II> = Map<
672676 Zip < Zip < IE , II > , Repeat < & ' a [ u8 ] > > ,
673677 fn (
674678 ( ( <<CS as CipherSuite >:: Group as Group >:: Elem , & [ u8 ] ) , & [ u8 ] ) ,
675- ) -> Result < GenericArray < u8 , << CS as CipherSuite >:: Hash as OutputSizeUser > :: OutputSize > > ,
679+ ) -> Result < Output < < CS as CipherSuite >:: Hash > > ,
676680> ;
677681
678682/// Can only fail with [`Error::Batch`] and returned values can only fail with
@@ -686,7 +690,10 @@ fn finalize_after_unblind<
686690 unblinded_elements : IE ,
687691 inputs : II ,
688692 info : Option < & ' a [ u8 ] > ,
689- ) -> Result < FinalizeAfterUnblindResult < ' a , CS , IE , II > > {
693+ ) -> Result < FinalizeAfterUnblindResult < ' a , CS , IE , II > >
694+ where
695+ <<CS as CipherSuite >:: Hash as OutputSizeUser >:: OutputSize : ArrayLength ,
696+ {
690697 if unblinded_elements. len ( ) != inputs. len ( ) {
691698 return Err ( Error :: Batch ) ;
692699 }
0 commit comments