src/Utilities/Miscellaneous.php
public static function getUniqueString($prefix = '', $hashed = false)
    {
        $unique = uniqid($prefix, true);

        if ($hashed) {
            return sha1($unique);
        }

        return $unique;
    }
public static function getUniqueString($prefix = '', $hashed = false)
    {
        $unique = uniqid($prefix, true);

        if ($hashed) {
            return sha1($unique);
        }

        return $unique;
    }
public static function getUniqueString ( $ prefix = '' , $ hashed = false ) { $ unique = uniqid ( $ prefix , true ) ; if ( $ hashed ) { return sha1 ( $ unique ) ; } return $ unique ; }
Returns unique string

@param string $prefix (optional) Prefix of the unique string. May be used while generating the unique
string simultaneously on several hosts at the same microsecond.
@param bool   $hashed (optional) If is set to true, the unique string is hashed additionally. Otherwise - not.
@return string
Returns unique string