端末の Argon2 コマンド

端末の Argon2 コマンド

私の端末(Debian)でArgon2を使用していますが、エラーが発生し、有効なコマンドの例が記載されているマニュアルやその他の文書が見つかりません。

誰かが私に最も重要なコマンドの基本的な要約を提供できますか?それとも良い参考資料を提供できますか?

私の使い方は私の前にありますが、それは私にとってあまり役に立ちません。

Usage:  argon2 [-h] salt [-i|-d|-id] [-t iterations] [-m log2(memory in KiB) | -k memory in KiB] [-p parallelism] [-l hash length] [-e|-r] [-v (10|13)]
    Password is read from stdin
Parameters:
    salt        The salt to use, at least 8 characters
    -i      Use Argon2i (this is the default)
    -d      Use Argon2d instead of Argon2i
    -id     Use Argon2id instead of Argon2i
    -t N        Sets the number of iterations to N (default = 3)
    -m N        Sets the memory usage of 2^N KiB (default 12)
    -k N        Sets the memory usage of N KiB (default 4096)
    -p N        Sets parallelism to N threads (default 1)
    -l N        Sets hash output length to N bytes (default 32)
    -e      Output only encoded hash
    -r      Output only the raw bytes of the hash
    -v (10|13)  Argon2 version (defaults to the most recent version, currently 13)
    -h      Print argon2 usage

ベストアンサー1

以下を実行できます。

echo -n "hashThis" | argon2 saltItWithSalt -l 32

結果ハッシュに関する複数行の情報を含む出力が提供されます。

単一の argon2 文字列でエンコードされた同じ情報を含む行を再インポートするには、-e最後に追加します。生のバイト-rだけが欲しい場合-e

おすすめ記事