fn extend(key: [32]u8, nonce: [24]u8, comptime rounds_nb: usize) struct
fn extend(key: [32]u8, nonce: [24]u8, comptime rounds_nb: usize) struct { key: [32]u8, nonce: [12]u8 } { var subnonce: [12]u8 = undefined; @memset(subnonce[0..4], 0); subnonce[4..].* = nonce[16..24].*; return .{ .key = ChaChaImpl(rounds_nb).hchacha20(nonce[0..16].*, key), .nonce = subnonce, }; }