aboutsummaryrefslogtreecommitdiffstats
path: root/src/nkeys.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/nkeys.zig')
-rw-r--r--src/nkeys.zig3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nkeys.zig b/src/nkeys.zig
index 3a6c2db..e3d9ef9 100644
--- a/src/nkeys.zig
+++ b/src/nkeys.zig
@@ -274,7 +274,7 @@ pub fn decodeSeed(text: *const text_seed) SeedDecodeError!DecodedSeed {
274 defer decoded.wipe(); // gets copied 274 defer decoded.wipe(); // gets copied
275 275
276 var key_ty_prefix = decoded.prefix[0] & 0b11111000; 276 var key_ty_prefix = decoded.prefix[0] & 0b11111000;
277 var entity_ty_prefix = (decoded.prefix[0] & 0b00000111) << 5 | ((decoded.prefix[1] & 0b11111000) >> 3); 277 var entity_ty_prefix = (decoded.prefix[0] << 5) | (decoded.prefix[1] >> 3);
278 278
279 if (key_ty_prefix != @enumToInt(KeyTypePrefixByte.seed)) 279 if (key_ty_prefix != @enumToInt(KeyTypePrefixByte.seed))
280 return error.InvalidSeed; 280 return error.InvalidSeed;
@@ -328,7 +328,6 @@ const allowed_creds_section_chars_table: [256]bool = allowed: {
328 var table = [_]bool{false} ** 256; 328 var table = [_]bool{false} ** 256;
329 const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.="; 329 const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.=";
330 for (chars) |char| table[char] = true; 330 for (chars) |char| table[char] = true;
331
332 break :allowed table; 331 break :allowed table;
333}; 332};
334 333