Unverified Commit abc2310b authored by Alex Pott's avatar Alex Pott
Browse files

Issue #1884836 by Lendude, cilefen, pwolanin, mgifford, alexpott: replace md5...

Issue #1884836 by Lendude, cilefen, pwolanin, mgifford, alexpott: replace md5 calls in DiffEngine with crc32b hashes
parent e4284d2d
Loading
Loading
Loading
Loading
+2 −2
Changes for core/lib/Drupal/Component/Diff/Engine/DiffEngine.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -129,11 +129,11 @@ public function diff($from_lines, $to_lines) {
  }

  /**
   * Returns the whole line if it's small enough, or the MD5 hash otherwise.
   * Returns the whole line if it's small enough, or a hash otherwise.
   */
  protected function _line_hash($line) {
    if (mb_strlen($line) > $this::MAX_XREF_LENGTH) {
      return md5($line);
      return hash('crc32b', $line);
    }
    else {
      return $line;