MCPcopy Create free account
hub / github.com/bytespider/Meross / computeDevicePassword

Function computeDevicePassword

packages/lib/src/utils/computeDevicePassword.ts:4–11  ·  view source on GitHub ↗
(
  macAddress: MacAddress,
  key: string = '',
  userId: number = 0
)

Source from the content-addressed store, hash-verified

2import { md5 } from './md5.js';
3
4export function computeDevicePassword(
5 macAddress: MacAddress,
6 key: string = '',
7 userId: number = 0
8): string {
9 const hash = md5(`${macAddress}${key}`, 'hex');
10 return `${userId}_${hash}`;
11}
12
13export default computeDevicePassword;

Callers 2

meross-info.tsFile · 0.90

Calls 1

md5Function · 0.85

Tested by

no test coverage detected