Ensures that $count_log2 is within set bounds.
Integer $count_log2: Integer that determines the number of iterations used in the hashing process. A larger value is more secure, but takes more time to complete.
Integer Integer within set bounds that is closest to $count_log2.
protected function enforceLog2Boundaries($count_log2) {
if ($count_log2 < static::MIN_HASH_COUNT) {
return static::MIN_HASH_COUNT;
}
elseif ($count_log2 > static::MAX_HASH_COUNT) {
return static::MAX_HASH_COUNT;
}
return (int) $count_log2;
}