windows如何使用自带的MD5加密字符串

223 阅读1分钟

windows如何使用自带的MD5加密字符串

$MD5String= "dddddd"
$md5 = New-Object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
$utf8 = New-Object -TypeName System.Text.UTF8Encoding
$hash = [System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($MD5String))).replace('-','').ToLower()
$hash

在这里插入图片描述