add take ggsw slice

This commit is contained in:
Pro7ech
2025-11-06 19:01:21 +01:00
parent 785bb46df2
commit c32db7d963

View File

@@ -155,6 +155,24 @@ where
) )
} }
fn take_ggsw_slice<A>(
&mut self,
size: usize,
infos: &A,
) -> (Vec<GGSW<&mut [u8]>>, &mut Self)
where
A: GGSWInfos,
{
let mut scratch: &mut Self = self;
let mut cts: Vec<GGSW<&mut [u8]>> = Vec::with_capacity(size);
for _ in 0..size {
let (ct, new_scratch) = scratch.take_ggsw(infos);
scratch = new_scratch;
cts.push(ct)
}
(cts, scratch)
}
fn take_ggsw_prepared_slice<A, M>( fn take_ggsw_prepared_slice<A, M>(
&mut self, &mut self,
module: &M, module: &M,