diff options
Diffstat (limited to 'tool/znk.zig')
-rw-r--r-- | tool/znk.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tool/znk.zig b/tool/znk.zig index 0a4b764..ff5540e 100644 --- a/tool/znk.zig +++ b/tool/znk.zig | |||
@@ -443,11 +443,11 @@ fn PrefixKeyGenerator(comptime EntropyReaderType: type) type { | |||
443 | } | 443 | } |
444 | } else struct { | 444 | } else struct { |
445 | pub fn generate(self: *Self) !void { | 445 | pub fn generate(self: *Self) !void { |
446 | var cpu_count = try std.Thread.cpuCount(); | 446 | var cpu_count = try std.Thread.getCpuCount(); |
447 | var threads = try self.allocator.alloc(*std.Thread, cpu_count); | 447 | var threads = try self.allocator.alloc(std.Thread, cpu_count); |
448 | defer self.allocator.free(threads); | 448 | defer self.allocator.free(threads); |
449 | for (threads) |*thread| thread.* = try std.Thread.spawn(Self.generatePrivate, self); | 449 | for (threads) |*thread| thread.* = try std.Thread.spawn(.{}, Self.generatePrivate, .{ self }); |
450 | for (threads) |thread| thread.wait(); | 450 | for (threads) |thread| thread.join(); |
451 | } | 451 | } |
452 | }; | 452 | }; |
453 | }; | 453 | }; |
@@ -526,7 +526,7 @@ pub fn readKeyFile(allocator: *Allocator, file: fs.File) ?Nkey { | |||
526 | allocator.free(bytes); | 526 | allocator.free(bytes); |
527 | } | 527 | } |
528 | 528 | ||
529 | var iterator = mem.split(bytes, "\n"); | 529 | var iterator = mem.split(u8, bytes, "\n"); |
530 | while (iterator.next()) |line| { | 530 | while (iterator.next()) |line| { |
531 | if (nkeys.isValidEncoding(line) and line.len == nkeys.text_seed_len) { | 531 | if (nkeys.isValidEncoding(line) and line.len == nkeys.text_seed_len) { |
532 | var k = Nkey.fromText(line) catch continue; | 532 | var k = Nkey.fromText(line) catch continue; |