mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-12-16 00:04:13 -05:00
bug fixes
This commit is contained in:
parent
b773064012
commit
712659e86f
4 changed files with 61 additions and 39 deletions
15
veilid-flutter/lib/base64url_no_pad.dart
Normal file
15
veilid-flutter/lib/base64url_no_pad.dart
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
String base64UrlNoPadEncode(List<int> bytes) {
|
||||
var x = base64Url.encode(bytes);
|
||||
while (x.endsWith('=')) {
|
||||
x = x.substring(0, x.length - 1);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
Uint8List base64UrlNoPadDecode(String source) {
|
||||
source = base64.normalize(source);
|
||||
return base64.decode(source);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue