27
22

More than 5 years have passed since last update.

コマンドラインで文字列のハッシュを生成する

Posted at

下の例では文字列 test のSHA256ハッシュを生成している。

$ echo -n 'test' | shasum -a 256
9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08  -
  • echoに渡している-nは改行を出力しないオプション
  • shasumに渡している-aはアルゴリズム指定オプション
27
22
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
27
22