help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: UUIDGEN in lisp


From: Eli Zaretskii
Subject: Re: UUIDGEN in lisp
Date: Mon, 16 Feb 2004 12:04:54 +0200

> Newsgroups: gnu.emacs.help
> From: Jesper Harder <harder@myrealbox.com>
> Date: Sun, 15 Feb 2004 21:47:44 +0100
> 
> (defun uuid-random ()
>   "Return a list of 16 random bytes."
>   (if (file-readable-p "/dev/urandom")
>       (let ((coding-system-for-read 'binary))
>       (mapcar 'identity
>               (substring
>                (string-as-unibyte
>                 (shell-command-to-string
>                  "dd count=16 bs=1 < /dev/urandom"))
>                0 16)))
>     (mapcar 'random (make-list 16 255))))

Jesper, can you explain why did you need all these monstrocities with
coding-system-for-read and string-as-unibyte?  Is there some real
problem behind this, or simply a bit of paranoia (no offense)?  What
am I missing?




reply via email to

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