diff options
Diffstat (limited to 'modules/gallery/helpers/random.php')
-rw-r--r-- | modules/gallery/helpers/random.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/gallery/helpers/random.php b/modules/gallery/helpers/random.php index 0ee83f49..ea08815a 100644 --- a/modules/gallery/helpers/random.php +++ b/modules/gallery/helpers/random.php @@ -17,13 +17,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + class random_Core { /** * Return a random 32 byte hash value. * @param string extra entropy data */ - static function hash($entropy="") { - return md5($entropy . uniqid(mt_rand(), true)); + static function hash($length=32) { + require_once(MODPATH . "gallery/vendor/joomla/crypt.php"); + return md5(JCrypt::genRandomBytes($length)); } /** |