MCPcopy Create free account
hub / github.com/cloudflare/wildebeest / stringToU8Array

Function stringToU8Array

backend/src/webpush/util.ts:37–39  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

35}
36
37export function stringToU8Array(str: string): Uint8Array {
38 return new Uint8Array(str.split('').map((c) => c.charCodeAt(0)))
39}
40
41export function u8ToString(u8: Uint8Array): string {
42 return String.fromCharCode.apply(null, u8 as unknown as number[])

Callers 6

signDataFunction · 0.90
generateContextFunction · 0.90
generatePRKFunction · 0.90
generateCEKInfoFunction · 0.90
generateNonceInfoFunction · 0.90
base64UrlToUint8ArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected