add take ggsw slice
Pro7ech jeanphilippe.bossuat@gmail.com
Thu, 06 Nov 2025 19:01:21 +0100
1 files changed,
18 insertions(+),
0 deletions(-)
jump to
M
poulpy-core/src/scratch.rs
→
poulpy-core/src/scratch.rs
@@ -155,6 +155,24 @@ scratch,
) } + 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>( &mut self, module: &M,