Last active
December 16, 2017 08:38
-
-
Save boochow/96c2a46eada7d03ba9f7c7e90efdac8b to your computer and use it in GitHub Desktop.
Ethernet MAC address from STM32 Hadware ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import binascii | |
id = binascii.unhexlify("330051001551343236363539") | |
hash = 0x811c9dc5 | |
for b in id: | |
hash = 16777619 * hash ^ b | |
print(hex(hash & 0x00ffffff)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment