LoginSignup
1
0

certutilコマンドの出力結果の違い(Win8.1~/ Win11)

Last updated at Posted at 2018-12-14

はじめに

Windows環境では、certutilというコマンドを使ってファイルのハッシュ値を計算することが出来ます。

certutil -hashfile [ファイルパス] [ハッシュ関数]

ハッシュ関数には、「SHA1」「SHA256」「MD5」など様々なものを指定できるので便利なのですが・・・MD5の場合、コマンドの実行結果の「表現の仕方」がWindows8.1とWindows10で異なっています。
ハッシュ値そのものは同じなので問題ありませんが、表現の仕方としてはWindows10の方が見やすく使いやすいと思います。

Windows8.1の場合

  • 結果のハッシュ値が、「bc d4 17 72 89 2d 29 ce 11 26 c7 b4 be 11 1d b6」と2桁ずつ半角のスペースで区切られています。
dos
c:\>certutil -hashfile sample.txt MD5
MD5 ハッシュ (ファイル sample.txt):
bc d4 17 72 89 2d 29 ce 11 26 c7 b4 be 11 1d b6
CertUtil: -hashfile コマンドは正常に完了しました。

Windows10/Windows11の場合

  • 結果のハッシュ値が、「bcd41772892d29ce1126c7b4be111db6」と一続きの文字列となっています。
dos
C:\>certutil -hashfile sample.txt MD5
MD5 ハッシュ (対象 sample.txt):
bcd41772892d29ce1126c7b4be111db6
CertUtil: -hashfile コマンドは正常に完了しました。

参考URL

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0