From 4bd5e9a46f4f7c214bd879ca1545657d7665e669 Mon Sep 17 00:00:00 2001 From: Kyle H Date: Sat, 7 Oct 2023 14:27:10 +0000 Subject: [PATCH] Add change to veilid_encoding.dart to fix base64 --- veilid-flutter/lib/veilid_encoding.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/veilid-flutter/lib/veilid_encoding.dart b/veilid-flutter/lib/veilid_encoding.dart index 316df202..be0d6247 100644 --- a/veilid-flutter/lib/veilid_encoding.dart +++ b/veilid-flutter/lib/veilid_encoding.dart @@ -13,7 +13,9 @@ String base64UrlNoPadEncode(List bytes) { } Uint8List base64UrlNoPadDecode(String source) { - source = base64.normalize(source); + if(source.length % 4 != 0) { + source = base64.normalize(source); + } return base64.decode(source); }