DiffEngine::_line_hash

protected DiffEngine::_line_hash($line)

Returns the whole line if it's small enough, or the MD5 hash otherwise.

File

core/lib/Drupal/Component/Diff/Engine/DiffEngine.php, line 136

Class

DiffEngine
Class used internally by Diff to actually compute the diffs.

Namespace

Drupal\Component\Diff\Engine

Code

1
2
3
4
5
6
7
8
protected function _line_hash($line) {
  if (Unicode::strlen($line) > $this::MAX_XREF_LENGTH) {
    return md5($line);
  }
  else {
    return $line;
  }
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.