0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[解決済み]ヤマハのMD5のバグ

Last updated at Posted at 2021-02-25

MS-DOSへのファイル転送をテストしていて、確認のためのツールを探していたところ、ヤマハさんmd5のコマンドを提供していました。

早速ダウンロードして試してみたところ、なんだかおかしな値が返ります。

Windows 7で32Bit版のEXEを試しました。

C:\>md5sum yyy
571c3b2b2d3e0442b33c352acf7397d0  yyy

MS-DOS版(16ビット)も同じ値です。

ソースで提供されているプログラムをFreeBSD/i386でビルドして試してみました

% ./md5sum yyy
ad5e4192180b69500b060bb870f55d51  yyy

FreeBSDのコマンドでも試しました。

% md5 yyy
MD5 (yyy) = ad5e4192180b69500b060bb870f55d51

Windows 7標準のツールでも確認してみました。

C:\>certutil -hashfile yyy MD5
MD5 ハッシュ (ファイル yyy):
ad 5e 41 92 18 0b 69 50 0b 06 0b b8 70 f5 5d 51
CertUtil: -hashfile コマンドは正常に完了しました。

ソースを見てみたところ、MS-DOS,Windowsの場合-bオプションが必要でした。

提供されているソースコードはopen-watcom-v2でもコンパイルできexeが作れました。

毎回オプションを指定するのが面倒なので、デフォルトを代えてみました。

0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?