- // Read an verify the MAC.
- let mut mac_read = [0u8, ..10];
- if try_read_io!(input.read(mac_read)) != mac_read.len() {
- return Err(UnconsistentMACSizeError)
- }
- let mac_data = crypto::compute_mac(data.as_slice());
- if mac_read != mac_data {
- return Err(MACMismatchError)
- }