2005-07-27から1日間の記事一覧

サンプル:ファイルのSHA1ハッシュを計算する。

MSH> function GetSha1 { >> $path = $args[0] >> $bytes = [System.IO.File]::ReadAllBytes($path) >> $sha1 = new-object System.Security.Cryptography.SHA1Managed >> $hash = $sha1.ComputeHash($bytes) >> $retval = "" >> foreach ($b in $hash) {$re…