KDF2 constructor

KDF2({
  1. required int iterations,
  2. required List<int> salt,
  3. required int dklen,
})

Implementation

factory KDF2(
    {required int iterations, required List<int> salt, required int dklen}) {
  if (salt.length != _SecretStorageConst.saltLength) {
    throw Web3SecretStorageDefinationV3Exception("Invalid salt length.",
        details: {
          "excepted": _SecretStorageConst.saltLength,
          "length": salt.length
        });
  }
  return KDF2._(iterations, salt, dklen);
}