Skip to content

Instantly share code, notes, and snippets.

@idiotandrobot
Created June 25, 2023 17:54
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 idiotandrobot/c2681778b6ab2249e4d94ba3ea2c3424 to your computer and use it in GitHub Desktop.
Save idiotandrobot/c2681778b6ab2249e4d94ba3ea2c3424 to your computer and use it in GitHub Desktop.
$md5 = New-Object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
$utf8 = New-Object -TypeName System.Text.UTF8Encoding
$String = "Hello, world!"
$Hash = ([System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($String)))).replace("-","").ToLower()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment