Skip to content

Instantly share code, notes, and snippets.

@JohnL4
Last active November 16, 2015 18:12
Show Gist options
  • Save JohnL4/64f8f8eb5f4f5a640548 to your computer and use it in GitHub Desktop.
Save JohnL4/64f8f8eb5f4f5a640548 to your computer and use it in GitHub Desktop.
PowerShell snipper to make an MD5 hash string from an arbitrary string
$stringToBeHashed = "[email protected]"
$md5Hash = [Security.Cryptography.MD5]::Create()
$hashBytes = $md5Hash.ComputeHash($stringToBeHashed.ToCharArray())
$hashString = ""
foreach ($b in $hashBytes) { $hashString = $hashString + $b.ToString("x2")}
$hashString
# http://www.gravatar.com/avatar/cd0858865a889264c5d383a0abca2eaf?d=identicon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment