From: Paul Eggert <eggert@cs.ucla.edu>
To: sand@blarg.net
Cc: emacs-devel@gnu.org
Subject: Re: Adding sha256 and sha512 to C?
Date: Fri, 27 May 2011 20:58:38 -0700 [thread overview]
Message-ID: <4DE072EE.4030303@cs.ucla.edu> (raw)
In-Reply-To: <19936.26998.559386.371174@priss.frightenedpiglet.com>
On 05/27/11 20:18, sand@blarg.net wrote:
> 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? Something like the following signature:
(crypto-hash-function ALGORITHM OBJECT
&optional START END CODING-SYSTEM NOERROR BINARY)
Then, we could implement the existing functions this way:
(defun md5 (object &optional start end coding-system noerror)
(crypto-hash-function 'md5 object start end coding-system noerror nil))
(define sha1 (object &optional start end binary)
(crypto-hash-function 'sha1 object start end nil nil binary))
next prev parent reply other threads:[~2011-05-28 3:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-28 3:18 Adding sha256 and sha512 to C? sand
2011-05-28 3:58 ` Paul Eggert [this message]
2011-05-28 7:25 ` Eli Zaretskii
2011-05-30 4:06 ` Stefan Monnier
2011-06-11 5:43 ` Leo
2011-06-11 8:00 ` Eli Zaretskii
2011-06-11 12:37 ` Leo
2011-06-11 15:24 ` Eli Zaretskii
2011-06-11 16:02 ` Paul Eggert
2011-06-11 20:36 ` Juanma Barranquero
2011-06-12 0:34 ` YAMAMOTO Mitsuharu
2011-06-12 13:03 ` Leo
2011-06-12 14:05 ` Thien-Thi Nguyen
2011-06-12 15:48 ` Deniz Dogan
2011-06-12 17:06 ` Richard Riley
2011-06-12 22:37 ` Paul Eggert
2011-06-19 16:08 ` Leo
2011-05-29 4:22 ` Leo
2011-05-29 5:18 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DE072EE.4030303@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=sand@blarg.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.