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

Function ArrayToHex

backend/src/webpush/util.ts:5–11  ·  view source on GitHub ↗
(byteArray: Uint8Array)

Source from the content-addressed store, hash-verified

3// use b64ToUrlEncoded to convert to URL safe b64
4
5function ArrayToHex(byteArray: Uint8Array): string {
6 return Array.prototype.map
7 .call(byteArray, (byte: number) => {
8 return ('0' + (byte & 0xff).toString(16)).slice(-2)
9 })
10 .join('')
11}
12
13export function generateRandomId(size = 16): string {
14 const buffer = new Uint8Array(size)

Callers 1

generateRandomIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected