Re: PHP 7.1 Cryptography Projects

From: Date: Tue, 04 Aug 2015 12:06:18 +0000
Subject: Re: PHP 7.1 Cryptography Projects
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-87601@lists.php.net to get a copy of this message
On 4 August 2015 at 13:56, Scott Arciszewski <scott@paragonie.com> wrote: > > Hi Peter, > > It's not really a "made-up string format", in the sense that it has a > precedent (PDO). > > True, and that format sucks royally. It trips people up. Combining several arguments into one string is bad design. If it was good design, you'd see userland code using it all over the place. > Hopefully my response to Lauri makes this design decision seem more > reasonable. > No, quite the opposite. You're arguing that this: new \Namespace\Class(":cipher=AES-256;mode=GCM"); is easier to work with than: new \Namespace\Class(null, 'AES-256', 'GCM'); Or possibly $config = new \Namespace\ConfigClass(); $config->setCipher('AES-256') ->setMode('GCM'); $crypto = new \Namespace\Class($config); Your parameter layout may be easier for you to deal with, but all the people you're trying to help with this will be worse off for it. PDOs constructor has only lead to more debugging, not better code (unlike the rest of PDO). Regards Peter

« previous php.internals (#87601) next »