From cbd04e1ae02491ab4c213fe03d62d12ca1546251 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 25 Apr 2011 23:26:43 -0700 Subject: Move random::string() to be test::random_string() and have it return a random string of any length. Also introduce test::lorem_ipsum() and use that in places where we want strings of words. Fixes #1713. --- modules/gallery/helpers/random.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/random.php b/modules/gallery/helpers/random.php index 6016df7b..06542e8c 100644 --- a/modules/gallery/helpers/random.php +++ b/modules/gallery/helpers/random.php @@ -19,21 +19,13 @@ */ class random_Core { /** - * Return a random 32 bit hash value. + * Return a random 32 byte hash value. * @param string extra entropy data */ static function hash($entropy="") { return md5($entropy . uniqid(mt_rand(), true)); } - /** - * Return a random hexadecimal string of the given length. - * @param int the desired length of the string - */ - static function string($length) { - return substr(random::hash(), 0, $length); - } - /** * Return a random floating point number between 0 and 1 */ -- cgit v1.2.3