[glib: 1/2] guuid: Document that g_uuid_string_random() is not secure



commit 812253a95f5fabe7f700ba9c08836f7f2edc04cd
Author: Philip Withnall <withnall endlessm com>
Date:   Mon Nov 25 10:08:05 2019 +0000

    guuid: Document that g_uuid_string_random() is not secure
    
    Signed-off-by: Philip Withnall <withnall endlessm com>
    
    Fixes: #1947

 glib/guuid.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/glib/guuid.c b/glib/guuid.c
index 1adc6c82e..8aa1d0084 100644
--- a/glib/guuid.c
+++ b/glib/guuid.c
@@ -193,7 +193,9 @@ g_uuid_generate_v4 (GUuid *uuid)
 /**
  * g_uuid_string_random:
  *
- * Generates a random UUID (RFC 4122 version 4) as a string.
+ * Generates a random UUID (RFC 4122 version 4) as a string. It has the same
+ * randomness guarantees as #GRand, so must not be used for cryptographic
+ * purposes such as key generation, nonces, salts or one-time pads.
  *
  * Returns: (transfer full): A string that should be freed with g_free().
  * Since: 2.52


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