function _DiffEngine::_line_hash

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

File

drupal/core/lib/Drupal/Component/Diff/DiffEngine.php, line 240
A PHP diff engine for phpwiki. (Taken from phpwiki-1.3.3)

Class

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

Code

function _line_hash($line) {
  if (drupal_strlen($line) > $this
    ->MAX_XREF_LENGTH()) {
    return md5($line);
  }
  else {
    return $line;
  }
}