Skip to content

Instantly share code, notes, and snippets.

@boochow
Last active December 16, 2017 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boochow/96c2a46eada7d03ba9f7c7e90efdac8b to your computer and use it in GitHub Desktop.
Save boochow/96c2a46eada7d03ba9f7c7e90efdac8b to your computer and use it in GitHub Desktop.
Ethernet MAC address from STM32 Hadware ID
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