feat: scan
This commit is contained in:
@@ -39,8 +39,10 @@ class NoteScan extends Model
|
||||
return 'h:'.substr(hash('sha1', (string) ($item['title'] ?? '').'|'.(string) ($item['body'] ?? '')), 0, 24);
|
||||
}
|
||||
|
||||
public const HASH_VERSION = '2';
|
||||
|
||||
public static function itemHash(array $item): string
|
||||
{
|
||||
return hash('sha256', (string) ($item['title'] ?? '')."\n".(string) ($item['body'] ?? ''));
|
||||
return hash('sha256', self::HASH_VERSION."\n".(string) ($item['title'] ?? '')."\n".(string) ($item['body'] ?? ''));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user