| ... | ... | @@ -218,8 +218,9 @@ fn SipHash(comptime T: type, comptime c_rounds: usize, comptime d_rounds: usize) |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | /// Return an authentication tag for the current state |
| 221 | /// Assumes `out` is less than or equal to `mac_length`. |
| 221 | 222 | pub fn final(self: *Self, out: []u8) void { |
| 222 | | std.debug.assert(out.len >= mac_length); |
| 223 | std.debug.assert(out.len <= mac_length); |
| 223 | 224 | mem.writeIntLittle(T, out[0..mac_length], self.state.final(self.buf[0..self.buf_len])); |
| 224 | 225 | } |
| 225 | 226 | |