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); }