diff options
Diffstat (limited to 'src/portable.rs')
| -rw-r--r-- | src/portable.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/portable.rs b/src/portable.rs index 7af6828..822cd0d 100644 --- a/src/portable.rs +++ b/src/portable.rs @@ -177,6 +177,20 @@ pub fn hash_many<const N: usize>( } } +pub fn xof_many( + cv: &CVWords, + block: &[u8; BLOCK_LEN], + block_len: u8, + mut counter: u64, + flags: u8, + out: &mut [u8], +) { + for out_block in out.chunks_exact_mut(64) { + out_block.copy_from_slice(&compress_xof(cv, block, block_len, counter, flags)); + counter += 1; + } +} + #[cfg(test)] pub mod test { use super::*; @@ -195,4 +209,10 @@ pub mod test { fn test_hash_many() { crate::test::test_hash_many_fn(hash_many, hash_many); } + + // Ditto. + #[test] + fn test_xof_many() { + crate::test::test_xof_many_fn(xof_many); + } } |
