From fe3628a33fcd9cf0de3b0f02552ed0082e8bd2f7 Mon Sep 17 00:00:00 2001 From: zac-williamson Date: Wed, 11 Sep 2024 11:46:59 -0700 Subject: [PATCH] decoder now works for byte values that are 8 bits, not just 7 bits --- src/lib.nr | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib.nr b/src/lib.nr index 7af9936..3972e5c 100644 --- a/src/lib.nr +++ b/src/lib.nr @@ -1,5 +1,5 @@ struct Base64EncodeBE { - table: [u8; 128] + table: [u8; 256] } impl Base64EncodeBE { fn new() -> Self { @@ -20,7 +20,11 @@ impl Base64EncodeBE { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,// 65-90 (A-Z) 0, 0, 0, 0, 0, 0,// 91-96 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,// 97-122 (a-z) - 0, 0, 0, 0, 0// 123-127 + 0, 0, 0, 0, 0,// 123-127 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] } }