この資料は Rust 製のコマンドラインツール filehasher について紹介するものです。
Rustの環境構築やツールのインストール方法については以下を参照してください
filehasher は、指定したファイルのハッシュダイジェストを取得するCLIツールです。サポートしているハッシュアルゴリズムは md5 , SHA128 , SHA224 , SHA256 , SHA384 , SHA512 です。
GitHub - n1clud3/filehasher: Get hash from a file
filehasher [OPTIONS] <PATH>
-h
, —-help
ヘルプ情報を表示する-V
, —-version
バージョン情報を表示する-a
, --algorithm <ALGORITHM>
使用するハッシュアルゴリズム指定する
指定可能な値: md5
, SHA128
, SHA224
, SHA256
, SHA384
, SHA512
デフォルト: md5
<PATH>
ファイルのパス% filehasher people.json
The MD5 hash of "people.json" is 0ff8f7bbc861a4d976870a0705e0da0a
% filehasher -a md5 people.json
The MD5 hash of "people.json" is 0ff8f7bbc861a4d976870a0705e0da0a
% filehasher -a sha256 people.json
The SHA256 hash of "people.json" is 1b1e61df700028f84bbb871b0c970b7a6204c88d72d92e5e59e058af559e397d
% filehasher -u -a md5 people.json
0ff8f7bbc861a4d976870a0705e0da0a
% md5sum people.json
0ff8f7bbc861a4d976870a0705e0da0a people.json