Fix base64 on mobile

This commit is contained in:
Andras Schmelczer 2025-01-05 21:56:22 +00:00
parent 76683f9b0a
commit 5e8a6e50cd
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
4 changed files with 15 additions and 2 deletions

View file

@ -1,3 +1,5 @@
import { base64ToBytes } from "byte-base64";
export function deserialize(data: string): Uint8Array {
return Buffer.from(data, "base64");
return base64ToBytes(data);
}

View file

@ -1,3 +1,5 @@
import { bytesToBase64 } from "byte-base64";
export function serialize(data: Uint8Array): string {
return Buffer.from(data).toString("base64");
return bytesToBase64(data);
}