chg: [internal] ssdeep correlations speedup

pull/8356/head
Jakub Onderka 2022-05-11 11:52:16 +02:00
parent a0309a36c8
commit 8e8938fbda
1 changed files with 1 additions and 3 deletions

View File

@ -7,15 +7,13 @@ class FuzzyCorrelateSsdeep extends AppModel
public $recursive = -1;
public $actsAs = array('Containable');
public function ssdeep_prepare($hash)
{
list($block_size, $hash) = explode(':', $hash, 2);
$chars = array();
for ($i = 0; $i < strlen($hash); $i++) {
if (!in_array($hash[$i], $chars)) {
if (!in_array($hash[$i], $chars, true)) {
$chars[] = $hash[$i];
}
}