diff options
author | Rutger Broekhoff | 2021-05-24 23:31:38 +0200 |
---|---|---|
committer | Rutger Broekhoff | 2021-05-24 23:31:38 +0200 |
commit | e9a14d7f019f264fed826a55294be14b2f37ae76 (patch) | |
tree | 32ca051ed4e2db2d9bee60e68a18bf8171a45dd5 /src/znk.zig | |
parent | 5a760ca15a3e9894b3409c690afcd8b6cd7e4ece (diff) | |
download | zig-nkeys-e9a14d7f019f264fed826a55294be14b2f37ae76.tar.gz zig-nkeys-e9a14d7f019f264fed826a55294be14b2f37ae76.zip |
Rename things once again
Diffstat (limited to 'src/znk.zig')
-rw-r--r-- | src/znk.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/znk.zig b/src/znk.zig index 89fc82c..7837cc8 100644 --- a/src/znk.zig +++ b/src/znk.zig | |||
@@ -149,10 +149,10 @@ pub fn cmdGen(gpa: *Allocator, arena: *Allocator, args: []const []const u8) !voi | |||
149 | } else { | 149 | } else { |
150 | var kp = try nkeys.SeedKeyPair.generate(ty.?); | 150 | var kp = try nkeys.SeedKeyPair.generate(ty.?); |
151 | defer kp.wipe(); | 151 | defer kp.wipe(); |
152 | try stdout.writeAll(&kp.asTextSeed()); | 152 | try stdout.writeAll(&kp.textSeed()); |
153 | try stdout.writeAll("\n"); | 153 | try stdout.writeAll("\n"); |
154 | 154 | ||
155 | var public_key = kp.asTextPublicKey(); | 155 | var public_key = kp.textPublicKey(); |
156 | if (pub_out) { | 156 | if (pub_out) { |
157 | try stdout.writeAll(&public_key); | 157 | try stdout.writeAll(&public_key); |
158 | try stdout.writeAll("\n"); | 158 | try stdout.writeAll("\n"); |
@@ -378,12 +378,12 @@ const PrefixKeyGenerator = struct { | |||
378 | 378 | ||
379 | var kp = try nkeys.SeedKeyPair.generate(self.ty); | 379 | var kp = try nkeys.SeedKeyPair.generate(self.ty); |
380 | defer kp.wipe(); | 380 | defer kp.wipe(); |
381 | var public_key = kp.asTextPublicKey(); | 381 | var public_key = kp.textPublicKey(); |
382 | if (!mem.startsWith(u8, public_key[1..], self.prefix)) continue; | 382 | if (!mem.startsWith(u8, public_key[1..], self.prefix)) continue; |
383 | 383 | ||
384 | if (self.done.xchg(true, .SeqCst)) return; // another thread is already done | 384 | if (self.done.xchg(true, .SeqCst)) return; // another thread is already done |
385 | 385 | ||
386 | info("{s}", .{kp.asTextSeed()}); | 386 | info("{s}", .{kp.textSeed()}); |
387 | info("{s}", .{public_key}); | 387 | info("{s}", .{public_key}); |
388 | 388 | ||
389 | return; | 389 | return; |