Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61036 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37932 invoked from network); 29 Jun 2012 07:16:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jun 2012 07:16:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:61713] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CB/AD-62543-A565DEF4 for ; Fri, 29 Jun 2012 03:16:42 -0400 Received: by yenl12 with SMTP id l12so2883670yen.29 for ; Fri, 29 Jun 2012 00:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=W2iLsT1L3A+NaFrcNLFD9zYFhc3ikGJQtUtJ+SbwDt0=; b=PE2urnw1v99F4z10pOF7F4vbi50x5Gf6cmTgXeKy7V5fXKfs9azd8uCAf1VWdTd333 bv69JVabBvT2WxULIp1gTAfrt5VrSscpGIXBlvKfy3h/7cZeJf3H2GI1e9kpnk1ut6ZF X4foFlHHgNwOFZIvrOiJ4BUnD94Qh7viYFQK96pHXnzcHtjtdoW5ibPEIPj6/BnJMM8l mssGYH0swmwApEwR83L4DOWRj195mEEiRdA1QpYpr7gdc1ynIAtUZ7Z3m/BvAvQCEl7P XettthZexlJSYymt1Wa4J4fYRveYIrqoKpzK+xDUG8Fi5rSNVAyqi6hdQJvBJRRwvT2d HJRw== MIME-Version: 1.0 Received: by 10.236.114.161 with SMTP id c21mr974671yhh.51.1340954200047; Fri, 29 Jun 2012 00:16:40 -0700 (PDT) Received: by 10.147.113.7 with HTTP; Fri, 29 Jun 2012 00:16:39 -0700 (PDT) In-Reply-To: References: <1340815507.2802.9.camel@guybrush> <1340875005.2516.9.camel@guybrush> Date: Fri, 29 Jun 2012 09:16:39 +0200 Message-ID: To: Anthony Ferrara Cc: =?ISO-8859-1?Q?Johannes_Schl=FCter?= , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API From: pierre.php@gmail.com (Pierre Joye) hi Anthony, On Thu, Jun 28, 2012 at 9:36 PM, Anthony Ferrara wrote: >> I haven't looked at your patch. But if it has to call another >> PHP_FuNCTION then it's not good. crypt implementation should be >> accessible via C. > > I've refactored crypt() slightly to expose a PHP_API crypt_execute() > function that does just about everything except the argument parsing / > default randomizing. > https://github.com/ircmaxell/php-src/blob/hash_password/ext/standard/crypt.c It looks good. I would name it php_crypt instead. _execute means there is a prepare (well, there is but it is called on init :). Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org