]> mj.ucw.cz Git - libucw.git/commitdiff
The `randomkey' module has been removed.
authorMartin Mares <mj@ucw.cz>
Thu, 9 Feb 2012 21:54:43 +0000 (22:54 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 9 Feb 2012 21:54:43 +0000 (22:54 +0100)
Obsolete, no real use in years.

ucw/Makefile
ucw/lib.h
ucw/randomkey.c [deleted file]

index 9a136a0da69b437617d7613b432f390d6b5ae9e7..bf1232683d06d5a072120b253482c0e8307470ad 100644 (file)
@@ -19,7 +19,7 @@ LIBUCW_MODS= \
        fb-file carefulio fb-mem fb-temp tempfile fb-mmap fb-limfd fb-buffer fb-grow fb-pool fb-atomic fb-param fb-socket \
        char-cat char-upper char-lower unicode stkstring \
        wildmatch regex \
-       prime primetable random timer randomkey \
+       prime primetable random timer \
        bit-ffs bit-fls \
        url \
        mainloop main-block main-rec \
index 65ee86c0d539f5faf727aa70e512a134610ac359..ec984888d2287d8ac42a9765da1b9e0c24c35a41 100644 (file)
--- a/ucw/lib.h
+++ b/ucw/lib.h
@@ -192,10 +192,6 @@ void setproctitle_init(int argc, char **argv);
 void setproctitle(const char *msg, ...) FORMAT_CHECK(printf,1,2);
 char *getproctitle(void);
 
-/* randomkey.c */
-
-void randomkey(byte *buf, uns size);
-
 /* exitstatus.c */
 
 #define EXIT_STATUS_MSG_SIZE 32
diff --git a/ucw/randomkey.c b/ucw/randomkey.c
deleted file mode 100644 (file)
index c1f40e8..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- *     UCW Library -- Cryptographically Safe Random Key Generator
- *
- *     (c) 2002 Martin Mares <mj@ucw.cz>
- *
- *     This software may be freely distributed and used according to the terms
- *     of the GNU Lesser General Public License.
- */
-
-#include "ucw/lib.h"
-
-#include <fcntl.h>
-#include <unistd.h>
-
-void
-randomkey(byte *buf, uns size)
-{
-  int fd;
-
-  if ((fd = open("/dev/urandom", O_RDONLY, 0)) < 0)
-    die("Unable to open /dev/urandom: %m");
-  if (read(fd, buf, size) != (int) size)
-    die("Error reading /dev/urandom: %m");
-  close(fd);
-}