summaryrefslogtreecommitdiff
path: root/lib/random.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-05-29 13:13:12 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-06-03 19:54:58 +0200
commit0c6905d7aa6a44757578b71124d0c40a9e36050e (patch)
treeded5ccf9d096fdd0b8a9d64e86a7a5bd7d68a068 /lib/random.c
parentffcd96ef593f246b0db7a182a742f05ae4e94063 (diff)
downloadgnutls-0c6905d7aa6a44757578b71124d0c40a9e36050e.tar.gz
exported gnutls_rnd().
Diffstat (limited to 'lib/random.c')
-rw-r--r--lib/random.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/random.c b/lib/random.c
index 8721459f45..9acbe1f408 100644
--- a/lib/random.c
+++ b/lib/random.c
@@ -57,8 +57,20 @@ _gnutls_rnd_deinit (void)
return;
}
-int
-_gnutls_rnd (int level, void *data, size_t len)
+/**
+ * gnutls_rnd:
+ * @level: a security level
+ * @data: place to store random bytes
+ * @len: The requested size
+ *
+ * This function will generate random data and store it
+ * to output buffer.
+ *
+ * Returns: Zero or a negative value on error.
+ *
+ **/
+
+int gnutls_rnd (gnutls_rnd_level_t level, void *data, size_t len)
{
if (len > 0)
{