This is an Advent of Code solution. Click to reveal!
Save and share
// Paste your Zig code or diffs here! // Terms of service and help is available at zigbin.io/zigbin const std = @import("std"); // Tip: When the paste is shared, line numbers mentioned in comments // are automatically highlighted. See comment examples below. // Line 10 shifts the wrong amount, any ideas? fn issecure_mask(comptime x: comptime_int) comptime_int { return 1 << x + 1; } // Also, lines 15-16 seems to bug out pub fn main() !void { var salt: [32]u8 = undefined; std.crypto.random.bytes(&salt); }
Compiler explorer ⚙
Create new paste