fn Hkdf(comptime Hmac: type) type

The Hkdf construction takes some source of initial keying material and derives one or more uniform keys from it.

Parameters

Hmac: type,

Functions

fn expand(out: []u8, ctx: []const u8, prk: [prk_length]u8) void

Derive a subkey from a master key prk and a subkey description ctx.

fn extract(salt: []const u8, ikm: []const u8) [prk_length]u8

Return a master key from a salt and initial keying material.

fn extractInit(salt: []const u8) Hmac

Initialize the creation of a master key from a salt and keying material that ca…

Initialize the creation of a master key from a salt and keying material that can be added later, possibly in chunks. Example:

var prk: [hkdf.prk_length]u8 = undefined;
var hkdf = HkdfSha256.extractInit(salt);
hkdf.update(ikm1);
hkdf.update(ikm2);
hkdf.final(&prk);

Values

prk_length
undefined

Length of a master key, in bytes.