Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86369 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48286 invoked from network); 25 May 2015 00:38:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2015 00:38:40 -0000 Authentication-Results: pb1.pair.com header.from=scott@paragonie.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=scott@paragonie.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain paragonie.com from 209.85.192.51 cause and error) X-PHP-List-Original-Sender: scott@paragonie.com X-Host-Fingerprint: 209.85.192.51 mail-qg0-f51.google.com Received: from [209.85.192.51] ([209.85.192.51:33763] helo=mail-qg0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5D/14-08079-D0F62655 for ; Sun, 24 May 2015 20:38:38 -0400 Received: by qgfa63 with SMTP id a63so37581943qgf.0 for ; Sun, 24 May 2015 17:38:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=z0Q3jXcFszyhIjzqIhTSmtNxUN72IaHi6hPf5DYroQc=; b=i4tDuktFeaWlYaZBYK06pkejh9XCGIDz3n3w9pI6ggB68IUB7SNjYsL1Q32vWYmXK/ S5dbSVeD3d0LWxJocPuFlT6sCbDqcx3N9sPEWcoDKkN0aU+Uy0D+n4L+i/Q0PuBgZgzw raZ5810xIYhK4yfFGvJC/OZY1CSksnGMltl9XEFhWOvhWDSGPIRw1KjUZ2Qf84S25rvC fHGR0dEplvsvhtXTws9WLjdKeEtHAsbP5H9kKihGB9Vzn/75pvtqSgbZmsHbCmdaQvje clWpW2xANatP4J1rmHDr5+MtrOFBW+KUqeURpFzcvbw5tSr/4Ts0ErXyOTqb+eRFP1xS yF2A== X-Gm-Message-State: ALoCoQllhdDcx6ja9EefbqAUkk4GG+ppkjbuiDQ5WA0xnVW7lpH50zgH97EYiZtbmWuez59fpM32 MIME-Version: 1.0 X-Received: by 10.55.18.103 with SMTP id c100mr9984297qkh.2.1432514314450; Sun, 24 May 2015 17:38:34 -0700 (PDT) Received: by 10.96.202.67 with HTTP; Sun, 24 May 2015 17:38:34 -0700 (PDT) X-Originating-IP: [71.47.14.165] In-Reply-To: <555ECC25.1040304@php.net> References: <555ECC25.1040304@php.net> Date: Sun, 24 May 2015 20:38:34 -0400 Message-ID: To: Michael Wallner Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=001a11466938d94d260516dd3aff Subject: Re: Fwd: [PHP-DEV] [RFC] [PHP 7.1] libsodium From: scott@paragonie.com (Scott Arciszewski) --001a11466938d94d260516dd3aff Content-Type: text/plain; charset=UTF-8 I don't think that's a good idea. There are already production systems that call it like \Sodium::function_here(). I'm not an extension developer; I don't know what level of effort would even be required to refactor it from a class with static methods to a namespace with functions. And when you consider the amount of effort you're asking the developers who are already using the existing method, it doesn't seem worth it anyway. What is your reason for wanting to change Sodium to a namespace and all methods to functions? Especially as someone who, presumably, has never used the library before. Scott Arciszewski Chief Development Officer Paragon Initiative Enterprises On Fri, May 22, 2015 at 2:26 AM, Michael Wallner wrote: > On 21/05/15 09:49, Peter Petermann wrote: > > Hi Scott, > > > > I personally think the RFC is a bit short, > > also I just had a very brief look at the documentation of the > extension in > > question, and find its API a bit strange, > > whats up with having everything in static method calls? > > > > regards, > > PP > > > > 2015-05-21 3:15 GMT+02:00 Scott Arciszewski : > > > >> The current state of cryptography in PHP is, well, abysmal. Our two main > >> choices for handling symmetric cryptography are libmcrypt (collecting > dust > >> since 2007) and openssl, which lacks a streaming API (e.g. > mcrypt_generic) > >> and GCM support. > >> > >> > >> I think now is a good time to talk about the possibility of making > >> libsodium a core PHP extension, depending on where things are when we > near > >> the 7.1 feature freeze. > >> > >> I've just opened an RFC for precisely this purpose: > >> https://wiki.php.net/rfc/libsodium > >> > > Yes, the choice of API looks pretty awkward; if we could settle on > PHP-5.6+, change Sodium to a namespace and all methods to functions > therein. > > -- > Regards, > Mike > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --001a11466938d94d260516dd3aff--