/// Input data into the universal hash function. If the length of the
/// data is not a multiple of the block size, the remaining data is
/// padded with zeroes up to the `BlockSize`.
///
/// This approach is frequently used by AEAD modes which use
/// Message Authentication Codes (MACs) based on universal hashing.
Input data into the universal hash function. If the length of the
data is not a multiple of the block size, the remaining data is
padded with zeroes up to the `BlockSize`.

This approach is frequently used by AEAD modes which use
Message Authentication Codes (MACs) based on universal hashing.
Input data into the universal hash function . If the length of the data is not a multiple of the block size the remaining data is padded with zeroes up to the ` BlockSize ` . This approach is frequently used by AEAD modes which use Message Authentication Codes ( MACs ) based on universal hashing .
fn update_padded(&mut self, data: &[u8]) {
        let mut chunks = data.chunks_exact(Self::BlockSize::to_usize());
        for chunk in &mut chunks {
            self.update(GenericArray::from_slice(chunk));
        }
        let rem = chunks.remainder();
        if !rem.is_empty() {
            let mut padded_block = GenericArray::default();
            padded_block[..rem.len()].copy_from_slice(rem);
            self.update(&padded_block);
        }
    }
fn update_padded ( & mut self , data : & [ u8 ] ) { let mut chunks = data . chunks_exact ( Self :: BlockSize :: to_usize ( ) ) ; for chunk in & mut chunks { self . update ( GenericArray :: from_slice ( chunk ) ) ; } let rem = chunks . remainder ( ) ; if ! rem . is_empty ( ) { let mut padded_block = GenericArray :: default ( ) ; padded_block [ .. rem . len ( ) ] . copy_from_slice ( rem ) ; self . update ( & padded_block ) ; } }
Input data into the universal hash function.
Input data into the universal hash function .
&mut self
data
&[u8]