crypto.pbkdf2のiterationsについて
The
iterationsargument must be a number set as high as possible. The higher the number of iterations, the more secure the derived key will be, but will take a longer amount of time to complete.
DeepL訳
引数 iterations には、できるだけ大きな数値を指定します。反復回数が多ければ多いほど、生成される鍵はより安全になりますが、完了するまでに長い時間がかかります。
crypto.pbkdf2の概要
Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) implementation. A selected HMAC digest algorithm specified by
digestis applied to derive a key of the requested byte length (keylen) from thepassword,saltanditerations.The supplied
callbackfunction is called with two arguments:errandderivedKey. If an error occurs while deriving the key,errwill be set; otherwiseerrwill benull. By default, the successfully generatedderivedKeywill be passed to the callback as aBuffer. An error will be thrown if any of the input arguments specify invalid values or types.
DeepL訳:
非同期のPassword-Based Key Derivation Function 2 (PBKDF2) の実装を提供する。digest で指定された HMAC ダイジェストアルゴリズムが適用され、 password, salt および iterations から要求されたバイト長 (keylen) の鍵を導出する。
与えられた callback 関数はerr と derivedKey の2つの引数で呼び出されます。鍵の導出中にエラーが発生した場合は err がセットされ、それ以外の場合は err は null となる。デフォルトでは、正常に生成された derivedKey は Buffer としてコールバックに渡される。入力引数に無効な値や型が指定された場合は、エラーがスローされます。