3 namespace Wallabag\CoreBundle\Helper
;
6 * Hash URLs for privacy and performance.
11 * Hash the given url using the given algorithm.
12 * Hashed url are faster to be retrieved in the database than the real url.
14 * @param string $algorithm
18 public static function hashUrl(string $url, $algorithm = 'sha1')
20 return hash($algorithm, urldecode($url));