From 731f6e9b611fd2d82704495befe3f3e27d96e288 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 21 Jan 2003 13:52:50 +0000 Subject: * 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. --- src/ChangeLog | 4 ++++ src/gcrypt.h | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src') 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 + + * gcrypt.h (gcry_random_add_bytes): Add QUALITY argument. + 2003-01-21 Timo Schulz * 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. */ -- cgit v1.2.1