chore: initial commit — AdonisJS v7 TR-069 ACS
- Docker infrastructure (Dockerfile, docker-compose.yml, genieacs-sim) - AdonisJS v7 app with Inertia.js + Vue 3 - MongoDB integration - CWMP/TR-069 state machine engine - Configuration engine with compliance tracking - Branding: ADAM ACS (favicon, navbar, locales) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
commit
d1c65dbf1e
164 files changed
+29127
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { createHash } from 'node:crypto'
|
||||
|
||||
/**
|
||||
* Generates a deterministic hex identifier for a device (URL-safe, 24 chars)
|
||||
*/
|
||||
export function getDeviceHashIdentifier(device: {
|
||||
oui: string
|
||||
productClass: string
|
||||
serialNumber: string
|
||||
manufacturer?: string
|
||||
}): string {
|
||||
const manufacturer = device.manufacturer ?? ''
|
||||
const canonical = `${manufacturer}-${device.oui}-${device.productClass}-${device.serialNumber}`
|
||||
return createHash('sha256').update(canonical).digest('hex').substring(0, 24)
|
||||
}
|
||||
Reference in new issue
Block a user