mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-13 01:27:03 +02:00
Updated timestamp algorithm to use sha256
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
@ -371,7 +371,14 @@ class ModelSearchMessage extends Model {
|
||||
$s .= $q['digest'];
|
||||
}
|
||||
|
||||
$computed_hash = sha1($s);
|
||||
$len = strlen($query->row['hash_value']);
|
||||
if($len == 64)
|
||||
$algo='sha256';
|
||||
elseif($len == 128)
|
||||
$algo='sha512';
|
||||
else
|
||||
$algo='sha1';
|
||||
$computed_hash = hash($algo, $s);
|
||||
|
||||
if(MEMCACHED_ENABLED) {
|
||||
$memcache->add($cache_key, $computed_hash, 0, MEMCACHED_TTL);
|
||||
|
Reference in New Issue
Block a user