Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93818 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97982 invoked from network); 5 Jun 2016 14:05:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jun 2016 14:05:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=fsb@thefsb.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=fsb@thefsb.org; sender-id=pass Received-SPF: pass (pb1.pair.com: domain thefsb.org designates 173.203.187.83 as permitted sender) X-PHP-List-Original-Sender: fsb@thefsb.org X-Host-Fingerprint: 173.203.187.83 smtp83.iad3a.emailsrvr.com Linux 2.6 Received: from [173.203.187.83] ([173.203.187.83:36083] helo=smtp83.iad3a.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/87-55579-8A134575 for ; Sun, 05 Jun 2016 10:05:29 -0400 Received: from smtp3.relay.iad3a.emailsrvr.com (localhost.localdomain [127.0.0.1]) by smtp3.relay.iad3a.emailsrvr.com (SMTP Server) with ESMTP id 9192B300211; Sun, 5 Jun 2016 10:05:26 -0400 (EDT) X-Auth-ID: fsb@thefsb.org Received: by smtp3.relay.iad3a.emailsrvr.com (Authenticated sender: fsb-AT-thefsb.org) with ESMTPSA id 6DD733001F8; Sun, 5 Jun 2016 10:05:26 -0400 (EDT) X-Sender-Id: fsb@thefsb.org Received: from yossy.local (c-66-30-62-12.hsd1.ma.comcast.net [66.30.62.12]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:587 (trex/5.5.4); Sun, 05 Jun 2016 10:05:26 -0400 To: Scott Arciszewski , Pierre Joye References: Cc: PHP Internals Message-ID: Date: Sun, 5 Jun 2016 10:04:58 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Libsodium - Discussion From: fsb@thefsb.org (Tom Worster) On 6/5/16 4:31 AM, Scott Arciszewski wrote: >> > - memzero, memcmp, hex2bin >> > >> > I am not totally convinced that memzero and maybe memcmp names are >> > good nor they should be there. Both would be very useful as operator >> > on variables. Given the simplicity of the implementations, it could be >> > very useful in many other areas in case this ext is not installed > > IMO: memzero is fine; memcmp isn't that great. memzero() stands out as unusual and interesting because PHP scripts don't usually get to manipulate memory, only variables. From the "Using" guide void \Sodium\memzero(&string $secret); it looks like it's for zeroing strings. What arg types does memzero() work with? Does it check argument type? Is it safe to use with opcache? Interned strings is an interesting case but there might be others. Tom