Re: [RFC] Libsodium - Discussion

From: Date: Sun, 05 Jun 2016 14:04:58 +0000
Subject: Re: [RFC] Libsodium - Discussion
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-93818@lists.php.net to get a copy of this message
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

« previous php.internals (#93818) next »