1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-05 18:41:02 +00:00
wallabag/src/Wallabag/CoreBundle/Helper/UrlHasher.php

23 lines
359 B
PHP
Raw Normal View History

<?php
namespace Wallabag\CoreBundle\Helper;
/**
* Hash URLs for privacy and performance.
*/
class UrlHasher
{
/** @var string */
const ALGORITHM = 'sha1';
/**
* @param string $url
*
* @return string hashed $url
*/
public static function hashUrl(string $url)
{
return hash(static::ALGORITHM, $url);
}
}