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.

TupleHash

The TupleHash extendable output hash function, with domain-separated inputs. TupleHash is a secure hash function with a variable output length, based on the cSHAKE function. It is designed for unambiguously hashing tuples of data.

With most hash functions, calling update("A") followed by update("B")is identical to update("AB"). With TupleHash, this is not the case: update("A"); update("B") is different from update("AB").

Any number of inputs can be hashed, and the output depends on individual inputs and their order.

sha3.TupleHash
pub fn TupleHash(comptime security_level: u11) type

File

lib/std/crypto/sha3.zig:374

Code

pub fn TupleHash(comptime security_level: u11) type {
    return TupleHashLike(security_level, 0x04, 24);
}