web.config を手動で更新するためにマシン キーを生成しようとしましたが、同じことを行うには powershell スクリプトが必要です。誰でもこれについて私を助けることができますか?
1094 次
1 に答える
1
これは機能しますか?
$key = "2012"
$string = "End of the world is nowhere near us."
$sha256 = New-Object System.Security.Cryptography.HMACSHA256
$sha256.key = [Text.Encoding]::ASCII.GetBytes($key)
$signature = $sha256.ComputeHash([Text.Encoding]::ASCII.GetBytes($string))
$hash = ([Convert]::ToBase64String($signature)) -replace '-',''
于 2013-09-30T06:17:12.780 に答える