Zig 0.17.0-dev (Split by item)

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 library itself.

hashManyPortable

blake3.hashManyPortable
fn hashManyPortable(inputs: [][*]const u8, num_inputs: usize, blocks: usize, key: [8]u32, counter_arg: u64, increment_counter: bool, flags: Flags, flags_start: Flags, flags_end: Flags, out: []u8) void

File

lib/std/crypto/blake3.zig:201

Code

fn hashManyPortable(inputs: [][*]const u8, num_inputs: usize, blocks: usize, key: [8]u32, counter_arg: u64, increment_counter: bool, flags: Flags, flags_start: Flags, flags_end: Flags, out: []u8) void {
    var counter = counter_arg;
    for (0..num_inputs) |i| {
        const input = inputs[i][0 .. blocks * Blake3.block_length];
        const result = hashOne(input, blocks, key, counter, flags, flags_start, flags_end);
        @memcpy(out[i * Blake3.digest_length ..][0..Blake3.digest_length], &result);
        if (increment_counter) {
            counter += 1;
        }
    }
}