Fix base64 on mobile
This commit is contained in:
parent
76683f9b0a
commit
5e8a6e50cd
4 changed files with 15 additions and 2 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import { base64ToBytes } from "byte-base64";
|
||||
|
||||
export function deserialize(data: string): Uint8Array {
|
||||
return Buffer.from(data, "base64");
|
||||
return base64ToBytes(data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import { bytesToBase64 } from "byte-base64";
|
||||
|
||||
export function serialize(data: Uint8Array): string {
|
||||
return Buffer.from(data).toString("base64");
|
||||
return bytesToBase64(data);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue