KDFScrypt constructor

KDFScrypt({
  1. required int dklen,
  2. required int n,
  3. required int r,
  4. required int p,
  5. required List<int> salt,
})

Implementation

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