Go to the documentation of this file.Go to the SVN repository for this file.
30 #include <gnutls/gnutls.h>
31 #include <gnutls/crypto.h>
32 #ifndef HAVE_GNUTLS_RND
35 #elif defined(HAVE_OPENSSL)
36 #include <openssl/rand.h>
44 #if defined(HAVE_GNUTLS) && defined(HAVE_GNUTLS_RND)
45 if (gnutls_rnd(GNUTLS_RND_RANDOM,
out,
len) >= 0)
47 if (gnutls_rnd(GNUTLS_RND_NONCE,
out,
len) >= 0)
49 #elif defined(HAVE_GNUTLS)
50 void *p = gcry_random_bytes(
len, GCRY_STRONG_RANDOM);
56 #elif defined(HAVE_OPENSSL)
57 if (RAND_bytes(
out,
len) == 1)
59 if (RAND_pseudo_bytes(
out,
len) >= 0)
65 out[
i] = rand() / (RAND_MAX / 256);
std::ofstream out("events_result.xml")
main entry point for tests
void tds_random_buffer(unsigned char *out, int len)
Main include file for libtds.