Home
last modified time | relevance | path

Searched full:rand (Results 1 – 25 of 812) sorted by relevance

12345678910>>...33

/freebsd/crypto/openssl/crypto/evp/
H A Devp_rand.c13 #include <openssl/rand.h>
55 EVP_RAND *rand = (EVP_RAND *)vrand; in evp_rand_up_ref() local
58 if (rand != NULL) in evp_rand_up_ref()
59 return CRYPTO_UP_REF(&rand->refcnt, &ref); in evp_rand_up_ref()
65 EVP_RAND *rand = (EVP_RAND *)vrand; in evp_rand_free() local
68 if (rand == NULL) in evp_rand_free()
70 CRYPTO_DOWN_REF(&rand->refcnt, &ref); in evp_rand_free()
73 OPENSSL_free(rand->type_name); in evp_rand_free()
74 ossl_provider_free(rand->prov); in evp_rand_free()
75 CRYPTO_FREE_REF(&rand->refcnt); in evp_rand_free()
[all …]
/freebsd/contrib/llvm-project/libcxx/modules/std/
H A Drandom.cppm
/freebsd/secure/lib/libcrypto/man/man3/
H A DEVP_RAND.377 EVP_RAND_STATE_ERROR \- EVP RAND routines
88 \& int EVP_RAND_up_ref(EVP_RAND *rand);
89 \& void EVP_RAND_free(EVP_RAND *rand);
90 \& EVP_RAND_CTX *EVP_RAND_CTX_new(EVP_RAND *rand, EVP_RAND_CTX *parent);
94 \& int EVP_RAND_get_params(EVP_RAND *rand, OSSL_PARAM params[]);
97 \& const OSSL_PARAM *EVP_RAND_gettable_params(const EVP_RAND *rand);
98 \& const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand);
99 \& const OSSL_PARAM *EVP_RAND_settable_ctx_params(const EVP_RAND *rand);
102 \& const char *EVP_RAND_get0_name(const EVP_RAND *rand);
103 \& const char *EVP_RAND_get0_description(const EVP_RAND *rand);
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/fuzzer/
H A DFuzzerMutate.cpp27 MutationDispatcher::MutationDispatcher(Random &Rand, in MutationDispatcher() argument
29 : Rand(Rand), Options(Options) { in MutationDispatcher()
63 static char RandCh(Random &Rand) { in RandCh() argument
64 if (Rand.RandBool()) in RandCh()
65 return static_cast<char>(Rand(256)); in RandCh()
67 return Special[Rand(sizeof(Special) - 1)]; in RandCh()
77 Rand.Rand<unsigned int>()); in Mutate_Custom()
100 Rand.Rand<unsigned int>()); in Mutate_CustomCrossOver()
113 Rand(std::min(Size, (size_t)8)) + 1; // [1,8] and <= Size. in Mutate_ShuffleBytes()
114 size_t ShuffleStart = Rand(Size - ShuffleAmount); in Mutate_ShuffleBytes()
[all …]
/freebsd/crypto/openssl/doc/man3/
H A DEVP_RAND.pod18 EVP_RAND_STATE_ERROR - EVP RAND routines
29 int EVP_RAND_up_ref(EVP_RAND *rand);
30 void EVP_RAND_free(EVP_RAND *rand);
31 EVP_RAND_CTX *EVP_RAND_CTX_new(EVP_RAND *rand, EVP_RAND_CTX *parent);
35 int EVP_RAND_get_params(EVP_RAND *rand, OSSL_PARAM params[]);
38 const OSSL_PARAM *EVP_RAND_gettable_params(const EVP_RAND *rand);
39 const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand);
40 const OSSL_PARAM *EVP_RAND_settable_ctx_params(const EVP_RAND *rand);
43 const char *EVP_RAND_get0_name(const EVP_RAND *rand);
44 const char *EVP_RAND_get0_description(const EVP_RAND *rand);
[all …]
/freebsd/share/examples/libvgl/
H A Ddemo.c108 VGLBitmapCopy(VGLDisplay, rand()%xsize, rand()%ysize, in main()
109 VGLDisplay, rand()%xsize, rand()%ysize, in main()
110 rand()%xsize, rand()%ysize); in main()
111 VGLLine(VGLDisplay, rand()%xsize, rand()%ysize, in main()
112 rand()%xsize, rand()%ysize, rand()%256); in main()
113 VGLEllipse(VGLDisplay, rand()%xsize, rand()%ysize, in main()
114 rand()%xsize/2, rand()%ysize/2, rand()%256); in main()
115 rand(); in main()
/freebsd/secure/lib/libcrypto/man/man7/
H A Dprovider-rand.757 .IX Title "PROVIDER-RAND 7ossl"
58 .TH PROVIDER-RAND 7ossl 2025-09-30 3.5.4 OpenSSL
64 provider\-rand \- The random number generation library <\-> provider
112 \& /* RAND parameter descriptors */
117 \& /* RAND parameters */
127 The RAND operation enables providers to implement random number generation
133 structure for holding context information during a rand operation.
134 A pointer to this context will be passed back in a number of the other rand
138 The parameter \fIparent\fR specifies another rand instance to be used for
144 \&\fBOSSL_FUNC_rand_freectx()\fR is passed a pointer to the provider side rand context in
[all …]
H A DEVP_RAND-TEST-RAND.757 .IX Title "EVP_RAND-TEST-RAND 7ossl"
58 .TH EVP_RAND-TEST-RAND 7ossl 2025-09-30 3.5.4 OpenSSL
64 EVP_RAND\-TEST\-RAND \- The test EVP_RAND implementation
71 "TEST-RAND" is the name for this implementation; it can be used with the
129 \& EVP_RAND *rand = EVP_RAND_fetch(NULL, "TEST\-RAND", NULL);
130 \& EVP_RAND_CTX *rctx = EVP_RAND_CTX_new(rand, NULL);
135 \& EVP_RAND *rand;
143 \& rand = EVP_RAND_fetch(NULL, "TEST\-RAND", NULL);
144 \& rctx = EVP_RAND_CTX_new(rand, NULL);
145 \& EVP_RAND_free(rand);
H A Dlife_cycle-rand.757 .IX Title "LIFE_CYCLE-RAND 7ossl"
58 .TH LIFE_CYCLE-RAND 7ossl 2025-09-30 3.5.4 OpenSSL
64 life_cycle\-rand \- The RAND algorithm life\-cycle
71 This state represents the RAND before it has been allocated. It is the
75 This state represents the RAND after it has been allocated but unable to
79 This state represents the RAND when it is set up and capable of generating
83 This state represents the RAND when it has been shutdown and it is no longer
87 This state is entered when the RAND is freed. It is the terminal state
91 The usual life-cycle of a RAND is illustrated:
142 \&\fBprovider\-rand\fR\|(7), \fBEVP_RAND\fR\|(3).
[all …]
H A DEVP_RAND-SEED-SRC.771 building using the \fB\-\-with\-rand\-seed=\fR option. By default, operating system
94 \& EVP_RAND *rand = EVP_RAND_fetch(NULL, "SEED\-SRC", NULL);
95 \& EVP_RAND_CTX *rctx = EVP_RAND_CTX_new(rand, NULL);
100 \& EVP_RAND *rand;
107 \& rand = EVP_RAND_fetch(NULL, "SEED\-SRC", NULL);
108 \& seed = EVP_RAND_CTX_new(rand, NULL);
110 \& EVP_RAND_free(rand);
113 \& rand = EVP_RAND_fetch(NULL, "CTR\-DRBG", NULL);
114 \& rctx = EVP_RAND_CTX_new(rand, seed);
115 \& EVP_RAND_free(rand);
H A DEVP_RAND-JITTER.797 \& EVP_RAND *rand = EVP_RAND_fetch(NULL, "JITTER", NULL);
98 \& EVP_RAND_CTX *rctx = EVP_RAND_CTX_new(rand, NULL);
114 \& EVP_RAND *rand;
121 \& rand = EVP_RAND_fetch(NULL, "JITTER", NULL);
122 \& seed = EVP_RAND_CTX_new(rand, NULL);
124 \& EVP_RAND_free(rand);
127 \& rand = EVP_RAND_fetch(NULL, "CTR\-DRBG", NULL);
128 \& rctx = EVP_RAND_CTX_new(rand, seed);
129 \& EVP_RAND_free(rand);
/freebsd/crypto/openssl/crypto/rand/
H A Drand_lib.c20 #include "crypto/rand.h"
220 * configurable via the --with-rand-seed configure option.
308 /* If we have an engine that can do RAND, use it. */ in RAND_get_rand_method()
409 EVP_RAND_CTX *rand; in RAND_status() local
417 if ((rand = RAND_get0_primary(NULL)) == NULL) in RAND_status()
419 return EVP_RAND_get_state(rand) == EVP_RAND_STATE_READY; in RAND_status()
440 EVP_RAND_CTX *rand; in RAND_priv_bytes_ex() local
461 rand = rand_get0_private(ctx, dgbl); in RAND_priv_bytes_ex()
462 if (rand != NULL) in RAND_priv_bytes_ex()
463 return EVP_RAND_generate(rand, buf, num, strength, 0, NULL, 0); in RAND_priv_bytes_ex()
[all …]
H A Drand_uniform.c10 #include "crypto/rand.h"
28 uint32_t f2, rand; /* extra fractional part and random material */ in ossl_rand_uniform_uint32() local
41 if (RAND_bytes_ex(ctx, (unsigned char *)&rand, sizeof(rand), 0) <= 0) { in ossl_rand_uniform_uint32()
56 prod = (uint64_t)upper * rand; in ossl_rand_uniform_uint32()
77 if (RAND_bytes_ex(ctx, (unsigned char *)&rand, sizeof(rand), 0) <= 0) { in ossl_rand_uniform_uint32()
81 prod = (uint64_t)upper * rand; in ossl_rand_uniform_uint32()
/freebsd/crypto/openssl/doc/man7/
H A DEVP_RAND-SEED-SRC.pod13 building using the B<--with-rand-seed=> option. By default, operating system
41 EVP_RAND *rand = EVP_RAND_fetch(NULL, "SEED-SRC", NULL);
42 EVP_RAND_CTX *rctx = EVP_RAND_CTX_new(rand, NULL);
46 EVP_RAND *rand;
53 rand = EVP_RAND_fetch(NULL, "SEED-SRC", NULL);
54 seed = EVP_RAND_CTX_new(rand, NULL);
56 EVP_RAND_free(rand);
59 rand = EVP_RAND_fetch(NULL, "CTR-DRBG", NULL);
60 rctx = EVP_RAND_CTX_new(rand, seed);
61 EVP_RAND_free(rand);
H A Dprovider-rand.pod5 provider-rand - The random number generation library E<lt>-E<gt> provider
55 /* RAND parameter descriptors */
60 /* RAND parameters */
70 The RAND operation enables providers to implement random number generation
77 structure for holding context information during a rand operation.
78 A pointer to this context will be passed back in a number of the other rand
82 The parameter I<parent> specifies another rand instance to be used for
88 OSSL_FUNC_rand_freectx() is passed a pointer to the provider side rand context in
152 =head2 Rand Parameters
160 OSSL_FUNC_rand_set_ctx_params() sets rand parameters associated with the given
[all …]
H A DEVP_RAND-TEST-RAND.pod5 EVP_RAND-TEST-RAND - The test EVP_RAND implementation
14 "TEST-RAND" is the name for this implementation; it can be used with the
78 EVP_RAND *rand = EVP_RAND_fetch(NULL, "TEST-RAND", NULL);
79 EVP_RAND_CTX *rctx = EVP_RAND_CTX_new(rand, NULL);
83 EVP_RAND *rand;
91 rand = EVP_RAND_fetch(NULL, "TEST-RAND", NULL);
92 rctx = EVP_RAND_CTX_new(rand, NULL);
93 EVP_RAND_free(rand);
H A DEVP_RAND-JITTER.pod44 EVP_RAND *rand = EVP_RAND_fetch(NULL, "JITTER", NULL);
45 EVP_RAND_CTX *rctx = EVP_RAND_CTX_new(rand, NULL);
60 EVP_RAND *rand;
67 rand = EVP_RAND_fetch(NULL, "JITTER", NULL);
68 seed = EVP_RAND_CTX_new(rand, NULL);
70 EVP_RAND_free(rand);
73 rand = EVP_RAND_fetch(NULL, "CTR-DRBG", NULL);
74 rctx = EVP_RAND_CTX_new(rand, seed);
75 EVP_RAND_free(rand);
/freebsd/lib/libc/stdlib/
H A Drand.336 .Nm rand ,
47 .Fn rand void
60 .Fn rand
72 .Fn rand
77 .Fn rand
84 .Fn rand
98 .Fn rand
109 .Fn rand
126 .Fn rand
129 .Fn rand
/freebsd/contrib/bc/tests/bc/scripts/
H A Drand.bc45 r = rand()
48 return rand()
58 rand() == r
66 a[i] = rand()
78 r = rand()
89 r == rand()
94 rand() == a[i]
/freebsd/crypto/libecc/src/examples/basic/
H A DMakefile14 …rho.c $(ROOT_DIR)/src/external_deps/print.c $(ROOT_DIR)/src/external_deps/rand.c $(LIBARITH) $(BIN…
17 …due.c $(ROOT_DIR)/src/external_deps/print.c $(ROOT_DIR)/src/external_deps/rand.c $(LIBARITH) $(BIN…
20 …les.c $(ROOT_DIR)/src/external_deps/print.c $(ROOT_DIR)/src/external_deps/rand.c $(ROOT_DIR)/src/e…
22 …cdh.c $(ROOT_DIR)/src/external_deps/print.c $(ROOT_DIR)/src/external_deps/rand.c $(BIN_LDFLAGS) $(…
27 …rho.c $(ROOT_DIR)/src/external_deps/print.c $(ROOT_DIR)/src/external_deps/rand.c $(BIN_LDFLAGS) -L…
30 …due.c $(ROOT_DIR)/src/external_deps/print.c $(ROOT_DIR)/src/external_deps/rand.c $(BIN_LDFLAGS) -L…
33 …les.c $(ROOT_DIR)/src/external_deps/print.c $(ROOT_DIR)/src/external_deps/rand.c $(ROOT_DIR)/src/e…
35 …cdh.c $(ROOT_DIR)/src/external_deps/print.c $(ROOT_DIR)/src/external_deps/rand.c $(BIN_LDFLAGS) -L…
/freebsd/crypto/openssl/test/recipes/
H A D05-test_rand.t37 @randdata = run(app(['openssl', 'rand', '-engine', 'ossltest', '-hex', '16' ]),
41 "rand with ossltest: Check rand output is as expected");
43 @randdata = run(app(['openssl', 'rand', '-hex', '2K' ]),
47 @randdata = run(app(['openssl', 'rand', '-engine', 'dasync', '-hex', '16' ]),
51 "rand with dasync: Check rand output is of expected length");
/freebsd/secure/usr.bin/openssl/man/
H A Dopenssl-rand.157 .IX Title "OPENSSL-RAND 1ossl"
58 .TH OPENSSL-RAND 1ossl 2025-09-30 3.5.4 OpenSSL
64 openssl\-rand \- generate pseudo\-random bytes
67 \&\fBopenssl rand\fR
73 [\fB\-rand\fR \fIfiles\fR]
97 For more details, see \fBRAND_bytes\fR\|(3), \fBRAND\fR\|(7), and \fBEVP_RAND\fR\|(7).
116 .IP "\fB\-rand\fR \fIfiles\fR, \fB\-writerand\fR \fIfile\fR" 4
117 .IX Item "-rand files, -writerand file"
/freebsd/contrib/wpa/src/eap_peer/
H A Deap_pax.c31 u8 x[EAP_PAX_RAND_LEN]; /* server rand */
32 u8 y[EAP_PAX_RAND_LEN]; /* client rand */
34 } rand; member
161 os_memcpy(data->rand.r.x, pos, EAP_PAX_RAND_LEN); in eap_pax_process_std_1()
162 wpa_hexdump(MSG_MSGDUMP, "EAP-PAX: X (server rand)", in eap_pax_process_std_1()
163 data->rand.r.x, EAP_PAX_RAND_LEN); in eap_pax_process_std_1()
172 if (random_get_bytes(data->rand.r.y, EAP_PAX_RAND_LEN)) { in eap_pax_process_std_1()
177 wpa_hexdump(MSG_MSGDUMP, "EAP-PAX: Y (client rand)", in eap_pax_process_std_1()
178 data->rand.r.y, EAP_PAX_RAND_LEN); in eap_pax_process_std_1()
180 if (eap_pax_initial_key_derivation(req->mac_id, data->ak, data->rand.e, in eap_pax_process_std_1()
[all …]
/freebsd/contrib/ntp/libntp/lib/isc/
H A Drandom.c82 * rand()'s lower bits are not random. in isc_random_get()
83 * rand()'s upper bit is zero. in isc_random_get()
87 *val = ((rand() >> 4) & 0xffff) | ((rand() << 12) & 0xffff0000); in isc_random_get()
90 *val = ((rand() >> 4) & 0x000007ff) | ((rand() << 7) & 0x003ff800) | in isc_random_get()
91 ((rand() << 18) & 0xffc00000); in isc_random_get()
/freebsd/contrib/llvm-project/llvm/lib/FuzzMutate/
H A DRandomIRBuilder.cpp91 auto RS = makeSampler(Rand, make_filter_range(GlobalVars, MatchesPred)); in findOrCreateGlobalVariable()
97 auto TRS = makeSampler<Constant *>(Rand); in findOrCreateGlobalVariable()
123 std::shuffle(SrcTys.begin(), SrcTys.end(), Rand); in findOrCreateSource()
127 auto RS = makeSampler(Rand, make_filter_range(Insts, MatchesPred)); in findOrCreateSource()
139 auto RS = makeSampler(Rand, make_filter_range(Args, MatchesPred)); in findOrCreateSource()
147 std::shuffle(Dominators.begin(), Dominators.end(), Rand); in findOrCreateSource()
154 makeSampler(Rand, make_filter_range(Instructions, MatchesPred)); in findOrCreateSource()
202 auto RS = makeSampler<Value *>(Rand); in newSource()
296 std::shuffle(SinkTys.begin(), SinkTys.end(), Rand); in connectToSink()
299 auto RS = makeSampler<Use *>(Rand); in connectToSink()
[all …]

12345678910>>...33