MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / generateDeviceId

Function generateDeviceId

packages/common/server/profileId.ts:10–17  ·  view source on GitHub ↗
({
  salt,
  ua,
  ip,
  origin,
}: GenerateDeviceIdOptions)

Source from the content-addressed store, hash-verified

8}
9
10export function generateDeviceId({
11 salt,
12 ua,
13 ip,
14 origin,
15}: GenerateDeviceIdOptions) {
16 return createHash(`${ua}:${ip}:${origin}:${salt}`, 16);
17}

Callers 3

transformEventMethod · 0.90
fetchDeviceIdFunction · 0.90
getDeviceIdFunction · 0.90

Calls 1

createHashFunction · 0.90

Tested by

no test coverage detected