DartArgon2State.constructor constructor

DartArgon2State.constructor({
  1. int version = 19,
  2. required DartArgon2Mode mode,
  3. required int parallelism,
  4. required int memory,
  5. required int iterations,
  6. required int hashLength,
  7. int? maxIsolates,
  8. int? minBlocksPerSliceForEachIsolate,
  9. int? blocksPerProcessingChunk,
})

Implementation

DartArgon2State.constructor({
  this.version = 19,
  required this.mode,
  required this.parallelism,
  required this.memory,
  required this.iterations,
  required this.hashLength,
  this.maxIsolates,
  this.minBlocksPerSliceForEachIsolate,
  this.blocksPerProcessingChunk,
}) {
  checkSystemIsLittleEndian();
  if (parallelism < 1) {
    throw ArgumentError.value(parallelism, 'parallelism');
  }
  if (memory < 8 * parallelism) {
    throw ArgumentError.value(memory, 'memory');
  }
  if (hashLength < 4) {
    throw ArgumentError.value(hashLength, 'hashLength');
  }
  if (iterations < 1) {
    throw ArgumentError.value(iterations, 'iterations');
  }
}