Skip to content

Instantly share code, notes, and snippets.

@dtrizna
Created March 6, 2023 15:00
Show Gist options
  • Save dtrizna/043aef888a8107238d7f499895ec306e to your computer and use it in GitHub Desktop.
Save dtrizna/043aef888a8107238d7f499895ec306e to your computer and use it in GitHub Desktop.
def normalizeStringHash(string):
string = re.sub(r'[0-9a-fA-F]{64}', "<sha256>", string)
string = re.sub(r'[0-9a-fA-F]{40}', "<sha1>", string)
string = re.sub(r'[0-9a-fA-F]{32}', "<md5>", string)
return string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment