INNER CODE UNIT · Rust
remaining_blocks
RustCrypto/stream-ciphers · chacha20/src/lib.rs:235
fn remaining_blocks(&self) -> Option<usize> {
V::remaining_blocks(self.get_block_pos())
}
fn process_with_backend(
&mut self,
f: impl cipher::StreamCipherClosure<BlockSize = Self::BlockSize>,
) {
cfg_if! {
if #[cfg(chacha20_backend = "soft")] {
f.call(&mut backends::soft::Backend(self));
} else if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {
cfg_if! {
if #[cfg(all(chacha20_avx512, chacha20_backend = "avx512"))] {
unsafe {
backends::avx512::inner::<R, _, V>(&mut self.state, f);
}
} else if #[cfg(chacha20_backend = "avx2")] {