Help Calculate SN, DEVICE ID 1, DEVICE ID 2 and signature from Mac address
S
Offline
Hi,
Can anyone help me understand how the fields are calculated ?
I have got the serial figured out and even device id 1 but not sure how id 2 and signature are calculated.
Any help would be appreciated.
TIA
-----------------------------
import hashlib
mac="00:1A:79:64:48:AE"
mac=mac.upper()
SN=(hashlib.md5(mac.encode('utf-8')).hexdigest())
SNENC=SN.upper()
SNCUT=SNENC[:13]
DEV=hashlib.sha256(mac.encode('utf-8')).hexdigest()
DEVENC=DEV.upper()
SG=SNCUT+'+'+(mac)
DEV2=(hashlib.sha256(SG.encode('utf-8')).hexdigest())
DEV2ENC=DEV2.upper()
print("SNENC:",SNENC)
print("SNCUT:",SNCUT)
print("Device ID1:",DEVENC)
print("Device ID2:",DEV2ENC)
-----------------------------
Can anyone help me understand how the fields are calculated ?
I have got the serial figured out and even device id 1 but not sure how id 2 and signature are calculated.
Any help would be appreciated.
TIA
-----------------------------
import hashlib
mac="00:1A:79:64:48:AE"
mac=mac.upper()
SN=(hashlib.md5(mac.encode('utf-8')).hexdigest())
SNENC=SN.upper()
SNCUT=SNENC[:13]
DEV=hashlib.sha256(mac.encode('utf-8')).hexdigest()
DEVENC=DEV.upper()
SG=SNCUT+'+'+(mac)
DEV2=(hashlib.sha256(SG.encode('utf-8')).hexdigest())
DEV2ENC=DEV2.upper()
print("SNENC:",SNENC)
print("SNCUT:",SNCUT)
print("Device ID1:",DEVENC)
print("Device ID2:",DEV2ENC)
-----------------------------