Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Private Function

digest

Private Function
std.hash.xxhash.XxHash3.Accumulator.digest
fn digest(noalias self: *Accumulator, total_len: u64, noalias last_block: *const InputBlock) u64

Params

File

hash/xxhash.zig:571
571
572
573
574
575
576
577
578
579
580
581
582
583
        fn digest(noalias self: *Accumulator, total_len: u64, noalias last_block: *const InputBlock) u64 {
            const secret_block = self.secret[192 - block_bytes - 7 ..][0..block_bytes];
            round(&self.state, last_block, @ptrCast(secret_block));

            const merge_block: Block = @bitCast(self.secret[11 .. 11 + block_bytes].*);
            self.state ^= merge_block;

            var result = XxHash64.prime_1 *% total_len;
            inline for (0..4) |i| {
                result +%= fold(self.state[i * 2], self.state[i * 2 + 1]);
            }
            return avalanche(.h3, result);
        }