MCPcopy Create free account
hub / github.com/CommE2E/comm / base64EncodeBuffer

Function base64EncodeBuffer

web/utils/base64-utils.js:3–5  ·  view source on GitHub ↗
(data: Uint8Array)

Source from the content-addressed store, hash-verified

1// @flow
2
3function base64EncodeBuffer(data: Uint8Array): string {
4 return btoa(String.fromCharCode(...data));
5}
6
7function base64DecodeBuffer(base64String: string): Uint8Array {
8 const binaryString = atob(base64String);

Callers 2

generateThumbHashFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected