Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71990 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63967 invoked from network); 2 Feb 2014 10:33:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Feb 2014 10:33:07 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.91 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.91 smtp91.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.91] ([108.166.43.91:45153] helo=smtp91.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F1/38-30967-FDE1EE25 for ; Sun, 02 Feb 2014 05:33:05 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp4.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id A38C2140156; Sun, 2 Feb 2014 05:33:01 -0500 (EST) X-Virus-Scanned: OK Received: by smtp4.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 54BE3140517; Sun, 2 Feb 2014 05:33:01 -0500 (EST) Message-ID: <52EE1EDC.2010309@sugarcrm.com> Date: Sun, 02 Feb 2014 02:33:00 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Yasuo Ohgaki , "internals@lists.php.net" References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Extending uniqid() or not? From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > It may be extend to produce safe unique ID > > string uniqid(TRUE) - Returns random ID string which is safe to use > security purposes. What's wrong with mcrypt_create_iv() which exists specifically for the purpose of generating secure random string? > P.S. Is anyone working UUID? PostgreSQL is using OSSP's UUID lib, it's good > for PHP. > http://www.postgresql.org/docs/9.2/interactive/uuid-ossp.html There's uuid extension for PHP as far as I can see: http://ossp-uuid.sourcearchive.com/documentation/1.6.2-1ubuntu2/php_2uuid_8c_source.html -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227