diff options
author | Curl Upstream <curl-library@cool.haxx.se> | 2017-06-14 06:08:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-14 14:46:35 (GMT) |
commit | 06d6d6c4aee149cd6560b919ef6935ef0867d921 (patch) | |
tree | d62adabf2b4b10030abf4a759b520e5edb6dd517 /lib/rand.h | |
parent | fd7d521c9d70655618db8232d45e5aaf81700f91 (diff) | |
download | CMake-06d6d6c4aee149cd6560b919ef6935ef0867d921.zip CMake-06d6d6c4aee149cd6560b919ef6935ef0867d921.tar.gz CMake-06d6d6c4aee149cd6560b919ef6935ef0867d921.tar.bz2 |
curl 2017-06-14 (54b636f1)
Code extracted from:
https://github.com/curl/curl.git
at commit 54b636f14546d3fde9f9c67c3b32701d78563161 (curl-7_54_1).
Diffstat (limited to 'lib/rand.h')
-rw-r--r-- | lib/rand.h | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -23,7 +23,7 @@ ***************************************************************************/ /* - * Curl_rand() stores 'num' number of random unsigned integers in the buffer + * Curl_rand() stores 'num' number of random unsigned characters in the buffer * 'rnd' points to. * * If libcurl is built without TLS support or with a TLS backend that lacks a @@ -37,7 +37,11 @@ * easy handle! * */ -CURLcode Curl_rand(struct Curl_easy *data, unsigned int *rnd, - unsigned int num); +CURLcode Curl_rand(struct Curl_easy *data, unsigned char *rnd, size_t num); + +/* Same as above but outputs only random lowercase hex characters. + Does NOT terminate.*/ +CURLcode Curl_rand_hex(struct Curl_easy *data, unsigned char *rnd, + size_t num); #endif /* HEADER_CURL_RAND_H */ |