Skip to content

Instantly share code, notes, and snippets.

@busheezy
Created October 2, 2021 02:16
Show Gist options
  • Save busheezy/eb0ff492c33fc160e364d933512d49fd to your computer and use it in GitHub Desktop.
Save busheezy/eb0ff492c33fc160e364d933512d49fd to your computer and use it in GitHub Desktop.
import hashlib
bindingPhrase = ""
fullBindingPhrase = f"-DMY_BINDING_PHRASE=\"{bindingPhrase}\""
fullBindingPhrase = fullBindingPhrase.strip()
bindingPhraseHash = hashlib.md5(fullBindingPhrase.encode()).digest()
UIDbytes = ",".join(list(map(str, bindingPhraseHash))[0:6])
print(UIDbytes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment