From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Adding sha256 and sha512 to C? Date: Mon, 30 May 2011 01:06:10 -0300 Message-ID: References: <19936.26998.559386.371174@priss.frightenedpiglet.com> <4DE072EE.4030303@cs.ucla.edu> <83mxi7b82v.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1306728394 16947 80.91.229.12 (30 May 2011 04:06:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 30 May 2011 04:06:34 +0000 (UTC) Cc: Paul Eggert , sand@blarg.net, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 30 06:06:30 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QQtkG-0007S5-Ui for ged-emacs-devel@m.gmane.org; Mon, 30 May 2011 06:06:25 +0200 Original-Received: from localhost ([::1]:43023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQtkG-0005Sd-Db for ged-emacs-devel@m.gmane.org; Mon, 30 May 2011 00:06:24 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQtkD-0005SY-UP for emacs-devel@gnu.org; Mon, 30 May 2011 00:06:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQtkC-0003sO-MG for emacs-devel@gnu.org; Mon, 30 May 2011 00:06:21 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:40304) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQtkC-0003sK-Jb for emacs-devel@gnu.org; Mon, 30 May 2011 00:06:20 -0400 Original-Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:52855 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QQtkB-0004hk-QG; Mon, 30 May 2011 00:06:20 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 01C90660D3; Mon, 30 May 2011 01:06:10 -0300 (ART) In-Reply-To: <83mxi7b82v.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 28 May 2011 10:25:12 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:139886 Archived-At: >> > The gnulib crypto library also has sha256 and sha512 >> > functions; is there any objection to adding those as well? >> Sounds good, but rather than continue to add crypto functions >> wouldn't it be better to have a single function parameterized by the >> algorithm name? > I agree with Paul: the API he proposes makes much more sense. I'm not sue the CODING-SYSTEM argument is a good idea. Other than that, I wouldn't object, although really I don't see the advantage either. I'd argue you could define: (defalias 'crypto-hash-function #'apply) and still call (crypto-hash-function 'md5 object start end). Stefan