HkdfParameters constructor

HkdfParameters(
  1. dynamic ikm,
  2. dynamic desiredKeyLength, [
  3. dynamic salt,
  4. dynamic info,
  5. dynamic skipExtract = false,
])

Implementation

factory HkdfParameters(ikm, desiredKeyLength,
    [salt, info, skipExtract = false]) {
  if (ikm == null) {
    throw ArgumentError('IKM (input keying material) should not be null');
  }

  if (salt == null || salt.length == 0) {
    salt = null;
  }

  return HkdfParameters._(
      ikm, desiredKeyLength, salt, info ?? Uint8List(0), skipExtract);
}