[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should Emacs provide a uuid function?

From: Eli Zaretskii
Subject: Re: Should Emacs provide a uuid function?
Date: Mon, 09 May 2011 14:35:40 +0300

> From: Ted Zlatanov <address@hidden>
> Date: Mon, 09 May 2011 05:51:50 -0500
> On Mon, 09 May 2011 10:23:06 +0300 Eli Zaretskii <address@hidden> wrote: 
> EZ> Feh.  Using platform-dependent interfaces in Lisp is not the Emacs
> EZ> way, in my book.  How about a primitive which would read from
> EZ> /dev/random or /dev/urandom if they are available, or use other
> EZ> methods if they are not?
> ...
> EZ> This all will be avoided if we instead provide a primitive that will
> EZ> both hide system-dependent stuff and avoid the need to teach
> EZ> insert-file-contents about this special device.
> GnuTLS has facilities for this, using /dev/*random and the Yarrow
> algorithm from libnettle.  Look at lib/nettle/rnd.c
> http://git.savannah.gnu.org/gitweb/?p=gnutls.git;a=tree;f=lib/nettle;hb=HEAD
> for the `do_trivia_source' and `do_device_source' functions.

Yes, I meant to use on Windows the 2 APIs that rnd.c uses.

> Since GnuTLS is enabled by default in Emacs 24 maybe we can rely on that
> functionality instead of writing it anew?

It is enabled, but it isn't guaranteed to be present.  It isn't a good
idea, IMO, to have features unrelated to gnutls depend on it being

reply via email to

[Prev in Thread] Current Thread [Next in Thread]