fn bcrypt(password: []const u8, salt: [salt_length]u8, params: Params) [dk_length]u8

Compute a hash of a password using 2^rounds_log rounds of the bcrypt key stretching function. bcrypt is a computationally expensive and cache-hard function, explicitly designed to slow down exhaustive searches.

The function returns the hash as a dk_length byte array, that doesn’t include anything besides the hash output.

For a generic key-derivation function, use bcrypt.pbkdf() instead.

IMPORTANT: by design, bcrypt silently truncates passwords to 72 bytes. If this is an issue for your application, use bcryptWithoutTruncation instead.

Parameters

password: []const u8,
salt: [salt_length]u8,
params: Params,