Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #converts string to MD5 hash in hyphenated and uppercase format
- $someString = "test"
- $md5 = new-object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
- $utf8 = new-object -TypeName System.Text.UTF8Encoding
- $hash = [System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($someString)))
- #to remove hyphens and downcase letters add:
- $hash = $hash.ToLower() -replace '-', ''
Add Comment
Please, Sign In to add comment