summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2003-01-21 13:52:50 +0000
committerWerner Koch <wk@gnupg.org>2003-01-21 13:52:50 +0000
commit731f6e9b611fd2d82704495befe3f3e27d96e288 (patch)
tree289f146ee399111eb3f0ad559b10f3179096bc4b /src
parentbd2754ef4035013596fe68a871e9305712231a2f (diff)
downloadlibgcrypt-731f6e9b611fd2d82704495befe3f3e27d96e288.tar.gz
* gcrypt.h (gcry_random_add_bytes): Add QUALITY argument.
* random.c (gcry_random_add_bytes): Add QUALITY argument, let function return an error code and disable its core for now.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/gcrypt.h8
2 files changed, 9 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 09b3d26c..55a001ca 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2003-01-21 Werner Koch <wk@gnupg.org>
+
+ * gcrypt.h (gcry_random_add_bytes): Add QUALITY argument.
+
2003-01-21 Timo Schulz <twoaday@freakmail.de>
* gcrypt.h (gcry_random_add_bytes): New.
diff --git a/src/gcrypt.h b/src/gcrypt.h
index 9a0b7802..ff819163 100644
--- a/src/gcrypt.h
+++ b/src/gcrypt.h
@@ -1,5 +1,5 @@
/* gcrypt.h - GNU cryptographic library interface
- * Copyright (C) 1998,1999,2000,2001,2002 Free Software Foundation, Inc.
+ * Copyright (C) 1998,1999,2000,2001,2002,2003 Free Software Foundation, Inc.
*
* This file is part of Libgcrypt.
*
@@ -856,8 +856,10 @@ enum gcry_random_level
void gcry_randomize (unsigned char *buffer, size_t length,
enum gcry_random_level level);
-/* Add the external random from BUFFER with LENGTH bytes into the pool. */
-void gcry_random_add_bytes (const void * buffer, size_t length);
+/* Add the external random from BUFFER with LENGTH bytes into the
+ pool. QUALITY should either be -1 for unknown or in the range of 0
+ to 100 */
+int gcry_random_add_bytes (const void *buffer, size_t length, int quality);
/* Return NBYTES of allocated random using a random numbers of quality
LEVEL. */